On Sun, Mar 3, 2013 at 7:12 PM, Igor Stasenko <siguctua@gmail.com> wrote:
yeah.. but i would go even further: since you already sending a message, why
not using a looked-up name as selector?
<obj> Foo -> gives binding of 'Foo' in environment.
<obj> Foo: <value> -> sets the new value.
One of the goals with environments is to avoid syntactic or semantic changes to the language. All existing code should run as-is, and still benefit from the namespace isolation that we get from environments. Your idea above seems feasible for a new language, but it breaks compatibility.
So I'll take this as a vote in favour of Eliot's idea—message send rather than direct access, but preserving the existing syntax and semantics of Smalltalk.