On Jun 5, 2012, at 9:52 AM, Jan Vrany wrote:

> On 04/06/12 22:56, Alexandre Bergel wrote:
>> This was the implementation in Modular Smalltalk if I remember correctly.
>> 
>> In plain Smalltalk you send a message named #msg and the lookup gives you a 
>> compile method.
>> In Modular Smalltalk, there is an intermediary step: #msg ->  #Namespace.msg 
>> ->  compile method
>> 
> 
> I see. What I do not see is how to achieve this without a cost at runtime. 
> Given that it should support imports. Without imports, SNs are
> pretty much useless :-)

I guess that you are saying that you need a look up between selectornamespace 
because you can have

A>String>>foo
                ^ 666
A>String>>bar 
                ^ self foo
        => compiled into 
        A>String>>bar 
                ^ self #A.foo
        
B import A
B>String>>foo
                ^ 42

in B 
        'ababab' foo
                -> 42
        'ababab' bar 
                =>compiled in 
                ababab' #B.bar 
                should still execute 
                        'ababab' #A.bar  since it is not redefined


Yes I agree with you.


Stef

        

Reply via email to