[squeak-dev] Object>>className
Levente Uzonyi
leves at caesar.elte.hu
Fri Mar 24 21:44:00 UTC 2017
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.
> 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.
Levente
P.S.: The whole macpal category of Object should be cleaned up.
>
> Best regards
> -Tobias
>
>
>> Levente
>>
>>>
>>> Best regards
>>> -Tobias
>>
More information about the Squeak-dev
mailing list
|