[Modules] Name space semantics was: Re: Some of my thoughts

Andreas Raab Andreas.Raab at gmx.de
Thu Aug 16 00:25:31 UTC 2001


Stephen,

> I think this would be easy to implement and may be worth
> experimentation.

Ugh ... really?! It might be easy to implement but not necessarily easy to
comprehend - I at least couldn't even follow your description... What is it
that you're actually trying to do?! Can you give a simple example?!

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org]On Behalf
> Of Stephen
> Pair
> Sent: Wednesday, August 15, 2001 4:25 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: RE: [Modules] Name space semantics was: Re: Some of
> my thoughts
>
>
> One issue that has been raised from time to time is the idea
> of selector
> name spaces.  The idea being that methods could be added that are
> specific to some package, and can be easily installed and uninstalled.
>
> It would be nice to have this in the modules scheme I think...but it
> would require enhancing message lookup.
>
> What if we were to prepend selectors with a couple of bytes
> that were an
> index into an array (shared with the VM via the special objects).  The
> array would contain namespace objects, with some slot that contained a
> list of imported (prereq) name spaces.  For message sends,
> the compiler
> would generate selectors with the index of the current namespace
> prepended, the browsers would create method dictionary entries having
> selectors with these index bytes prepended.  Upon message lookup, if a
> matching method (for an namespace indexed selector) was not found, we
> would lookup the package based on the selector index, find the first
> prereq and then attempt another lookup with the selector modified for
> the index of the prereq...this would be repeated until the list of
> prereqs is exhausted, in which case the base selector
> (without an index
> prepended) is looked up.  The method cache should remain useful for
> selectors with a namespace index prepended.
>
> I think this would be easy to implement and may be worth
> experimentation.
>
> - Stephen





More information about the Squeak-dev mailing list