[squeak-dev] Object>>className

Tobias Pape Das.Linux at gmx.de
Fri Mar 24 21:49:37 UTC 2017


> On 24.03.2017, at 22:44, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> 
> On Fri, 24 Mar 2017, Tobias Pape wrote:
> 
>> 
>>> On 24.03.2017, at 19:36, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>>> On Fri, 24 Mar 2017, Tobias Pape wrote:
>>>>> On 24.03.2017, at 18:10, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>>>> - doesn't provide much utility as it is effectively foo class name, and foo className saves one character.
>>>> Law of Demeter.
>>> Blindly applying such ideas will result in a huge mess.
>>> In this case #className and #name cause more trouble than benefit.
>> 
>> I still fail to see that for #className.
>> 
>>> Object should shadow as few accessors as possible.
>> 
>> That's messy. How can we predict what superclass will shadow what in which subclass.
>> That's not gonna work. How should in 2000 anyone anticipate that someone years later will create Monticello and name an instance variable 'className'.
>> 
>> What about environment? executor? flash? presenter? scriptPerformer?
> 
> You act as if I were to support the presence of any of those methods; quite the contrary.
> 

No, I'm saying putting the burden of knowing the future on the methods in Object is unreasonable.
And I think it is perfectly ok to have different meanings to the same method between the root of our hierarchy and other classes.
Otherwise we could always use ProtoObject.

>> Do we have to anticipate that somewhen in some domain implementation these could be accessors down the hierarchy?
> 
> You can't see the future, but you can think twice _before_ adding a selector understood by _all objects_ in the system.
> Were there a huge warning displayed whenever you attempted to do that, there would probably be way fewer methods like those you listed.

I don't know. Maybe the problem here is that we still don't have a good modu… ok I stop here.

> 
> Levente
> 
> P.S.: The whole macpal category of Object should be cleaned up.

what is mapcal after all? and btw, who is 'sw'?

> 
>> 
>> Best regards
>> 	-Tobias
>> 
>> 
>>> Levente
>>>> Best regards
>>>> 	-Tobias



More information about the Squeak-dev mailing list