This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GSOC | Extending Common Lisp support


* Charles Turner [2012-06-17 15:06] writes:

> If the reader worked, what would the steps of this be:
>
> (export 'test::a 'test)
>
> Would the reader make sure test exists, 

No the reader doesn't create new packages.  The reader would signal an
error if the package "TEST" doesn't exist.

> then lookup 'a in its internal
> table, creating a new symbol if one didn't already exist?

Yes, the reader would use (intern "A" "TEST") to find/create the symbol.

If you had written 'test:a then the reader checks that "A" is an
external symbol in "TEST".  If it's not external then the reader signals
an error.

> So then what
> would export's first parameter be?

The result of (intern "A" "TEST")

> The symbol 'a whose hashCode would
> match 'a in test, but not say in an 'a in cl-user?

The hashcode of a symbol should be independent of the package it belongs
to.  Interning/uninterning symbols or renaming/deleting packages should
not have any effect on the symbols hashcode.

Helmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]