[Grace-core] Name resolution in Grace

Michael Homer mwh at ecs.vuw.ac.nz
Tue Jul 9 22:08:08 PDT 2013


On Wed, Jul 10, 2013 at 3:09 PM, Andrew P Black
<andrew.p.black at gmail.com> wrote:
>
> On 9 Jul 2013, at 14:21 , James Noble wrote:
>
>>> I wonder if it's time to revisit those decisions?
>>
>> oh I hope not again!
>
> Well, I knew that you wouldn't like this.  But I'm still waiting to see what you would like!
>
> Michael told us what he would like:
>
>> How about:
>> 1) Look at names in the current scope (i.e., names that would be
>> available if this scope existed without any surrounds). If a matching
>> name exists, resolve to it and terminate.
>> 2) Go out one scope, and forget about the scope we were in before.
>> 3) Go to 1.
>
> This explains lexical scope, but not inheritance.  So it's only half the story.
Inherited methods are on self and therefore available in the current
scope of "names that would be available if this scope existed without
any surrounds".
-Michael


More information about the Grace-core mailing list