Is this the old chestnut about direct access versus accessors from a software engineering standpoint or is it a purely technical discussion?
For me more a technical discussion to see how we could reuse more methods and have more late bound object structure access. Now the story about encapsulation in Smalltalk is mainly a convention (I do not use message
If it's the first, I kind of agree with Igor that *always* using selectors isn't great in Smalltalk, because accessors vs. ivars is the only mechanism we have to decide whether something is private or public.
As soon as you make an API public, then you get all kinds of assumptions to fight with the next time you want to change it.
Yes. This is why I have a hate/love affair with the unification of state and methods Ideally I would love to have: late bound state = unification + protected/public methods (but I could not find a nice model yet....) You can read encapsulation in dynamic language as a reflexion on the topic
If it's the second discussion, please accept my apologies for the interruption :-)
you are welcome.
Have a good Christmas, Steve
On Wed, Dec 22, 2010 at 11:27 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
Ideally I would love to be able to use accessors as the abstraction layer that they can bring us: I mean the fact that we could avoid to have offset based bytecode means that we could reuse a lot more the methods (in special case - mixins and others).
It's simply a bad idea.
Be scientific, bring real arguments on the table else this is not fun and I can just not reply to your email or have other preconceived statements.