[squeak-dev] Object>>className

Chris Muller asqueaker at gmail.com
Fri Mar 24 18:31:39 UTC 2017


Hi Eliot,

>> Object>>#name is a travesty, but #className seems perfectly
>> reasonable.  Did you notice the comment of the method?  -- it has
>> nothing to do with "is" testing, but for accessing the type names of
>> objects for a list, useful for presenting a list classes which could be
>> the receiver for constructor of more objects.
>
> You miss my point.  Many people complain about the proliferation of 'is'
> methods, but I see them as well worth the cost.  I agree that name is a
> travesty and className falls in the same category for me.  The issue is it
> exists as a printing method but it
> - collides with methods that are used to model classes and there are plenty
> of them

As does every method on Object.  Name overloading happens all the
time.  I don't think it should be a reason to single out any
particular method for de-rezolution.  :)

> - doesn't provide much utility as it is effectively foo class name, and foo
> className saves one character.

The utility is that it provides a performable selector which, as
alluded, can be used by list widgets or Maui.

Real quick, just so you know, I'm not passtionate about this
particular method, I'm just more interested in understanding and
discussing our criteria for decisions.  You mentioned utility, that is
definitely one.  Another is the human <-----> Class-Library interface.
I capitalized Class-Library there to help think of it as a singular
"Thing" that has its own big-picture aesthetic wholeness and
completeness.  It's not merely a collection of optimized classes and
methods.

>> I have overrides of #className in some of the Ma Serializer classes,
>> it's never presented any headache for me at all.
>
>
> Except when one uses "create inst var accessors" and the getter is not
> produced ;-)

Maybe that feature could be simply fixed to generate the overriding
method anyway, and put it in an "overriding" category instead of
"accessing", and/or add in a super call.

I just think we should not let this minor kink in a rinky-dink IDE
feature like "create inst var accesors" drive our decisions about the
content and aesthetic and usability of The Class Library.

Best Regards,
  Chris


More information about the Squeak-dev mailing list