[squeak-dev] Looking for scope in superclass environment

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Jul 30 20:29:16 UTC 2013


Currently, resolution is performed at compile time, so only the environment
you used to compile the superclass matters, at least that's how I
understand it.


2013/7/30 Frank Shearar <frank.shearar at gmail.com>

> On 30 July 2013 21:15, Nicolas Cellier
> <nicolas.cellier.aka.nice at gmail.com> wrote:
> > Currently, bindingOf:environment: will search for scope in superclass
> > environment.
> > This is an easy way to import all Smalltalk globals, since you'll end up
> > looking in Object/ProtoObject environment.
> >
> > But is it the way it should be?
> > Couldn't we inherit from a class without importing all the environment in
> > which it was declared?
> >
> > Couldn't we instead explicitily ask to import: #SomeClass or all of
> > Smalltalk globals?
> > (Beware, someone must ask Smalltalk to export: #SomeClass, or exportSelf
> for
> > such import to be possible)
>
> I would prefer to see explicit imports.
>
> What would happen to class references in the superclass? Would those
> resolve in the context of the superclass' environment, or the
> subclass'? (I think it would be more useful to resolve said references
> in the subclass, but I haven't thought long and hard about the
> problem.)
>
> frank
>
> > Nicolas
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130730/ba612195/attachment.htm


More information about the Squeak-dev mailing list