[bitc-dev] Re: Small question
Jonathan S. Shapiro
shap at eros-os.org
Thu Aug 18 02:05:53 EDT 2005
On Thu, 2005-08-18 at 01:54 -0400, Swaroop Sridhar wrote:
> Does the name of the interface have any significance inside the interface?
> That is, if I have
> (interface abc
> Can I write
> (define abc::x 200) ??
No. The interface name isn't even in the same *name space* as other
identifiers, so you can NOT write abc::x. However, note that *because*
these are two different name spaces, it is perfectly legal (if perverse)
(import abc abc)
(import def abc)
That is, the first import only defines abc in the identifier namespace.
It does not shadow it in the interface namespace.
I am thinking about something like TYPE-IMPORT. If one had this, then
one could conceivably write something like:
(type-import abc abc)
(defunion (abc::list 'a)
nil (cons 'a)))
The way to think about type-import is that for every type declaration in
the type-imported interface, it makes a corresponding PROCLAIM
available. This would allow circular type definitions (only).
More information about the bitc-dev