On Wed, Apr 4, 2012 at 4:59 AM, Levente Uzonyi <leves@elte.hu> wrote:
On Wed, 4 Apr 2012, Frank Shearar wrote:

I ported Francisco Garau's TypeInference engine to Squeak (well,
changed the one thing I needed to make it run on Squeak), and Marcus
noted the following:

Marcus Denker <marcus.denker@inria.fr> says:


It turns out that in Pharo we use Association and in Squeak we use
ReadOnlyVariableBinding; by changing VariableNode >> #isSharedVarNode

You should think about cleaning that up... in the SystemDictonary, old classes
are ReadOnlyVariableBinding, new ones are Associations. The code to make
a binding into a ReadOnlyVariableBinding is never called...

Given that I know next to nothing about this part of Squeak, I offer
it up to those more knowledgeable than I for assessment!

Markus is right, the code is not called, but I'm not sure it shouldn't be called. Just try the following in a throw-away image:

Object subclass: #Foo
� � � �instanceVariableNames: ''
� � � �classVariableNames: ''
� � � �poolDictionaries: ''
� � � �category: 'Foo'.
Foo := 1.

The value of Foo will be 1 and your browser will go nuts when you try to browse the Foo category.

Right. �ReadOnlyVariableBinding is a *good* idea! �(with�ReadOnlyVariableBinding evaluating Foo := 1 will raise an error).


Levente


frank






--
best,
Eliot