A fully late bound namespace proposal

nicolas cellier ncellier at ifrance.com
Thu Oct 4 20:00:47 UTC 2007


Funny Andreas, we could have said exactly the same about messages...
Sure a lot of curly brace defenders have already.

 From a pragmatical POV, you're probably right.
But from a historical, not sure...
Be a future VM able to transparently inline those lookups, that your 
arguments might vanish.

Andreas Raab a écrit :
> Göran Krampe wrote:
>> One way to do this is to compile a global ref as a message send so that:
>>
>>    Array
>>
>> ...compiles *as if* it said:
>>
>>    Smalltalk resolve: #Array
>>
>> ...or something similar. Then we can actually dynamically figure out 
>> if it
>> should evaluate to "good old Array" or "Jim's new cooler Array" depending
>> on for example the PI of the sender or any current remappings or 
>> whatever!
> 
> This is trivial to do but unfortunately it doesn't solve *any* real 
> problems. But it creates new ones: For example, access to classes would 
> suddenly be slowed down by 100x or more and you'd have to be very 
> careful where and how you use classes (no use in tight loops for 
> example) then creating new kinds of references (in iVars etc) that the 
> compilers don't know about and can't fix when recompiling stuff.
> 
> This has always been my problem with these late bound proposals: They 
> sound nice, but they do not solve any actual problem that their 
> proponents can point to, and everyone will be paying the price for a 
> horribly slow lookup of classes. Bad tradeoffs.
> 
> Cheers,
>   - Andreas
> 
> 




More information about the Squeak-dev mailing list