[squeak-dev] The Trunk: Graphics-mt.430.mcz

Jakob Reschke forums.jakob at resfarm.de
Fri Apr 24 16:41:14 UTC 2020


But you already know that this is a class name (hence classNamed:), not
just any name. And the name is complete (not a fragment), so there won't be
any waste in the Symbol table.

One could only argue whether it is an implementation detail that classes
are bound to Symbols and that their names are Symbols. You could ask the
same for selectors.

Otherwise, I would not write x = 1.0 if I know that x is always an integer
(or the other way around).



Marcel Taeumel <marcel.taeumel at hpi.de> schrieb am Fr., 24. Apr. 2020, 16:39:

> > Class and selector names should be symbolic.  They're keys to accessing
> specific objects in the system...
>
> Sure, but that's the next level of interpretation of the term "name" in
> the specific class context. Without knowing anything, I would always choose
> strings over symbols for something that requests a name because names don't
> have to be identical, they just label stuff.
>
> Best,
> Marcel
>
> Am 24.04.2020 00:50:50 schrieb Chris Muller <asqueaker at gmail.com>:
> On Tue, Apr 21, 2020 at 5:37 AM Marcel Taeumel <marcel.taeumel at hpi.de>
> wrote:
>
>> > Note that "Smalltalk classNamed: ..." is not Environments-friendly
>>
>> Good to know! What to use instead?
>>
>> > Also, why not use a Symbol for the class name?
>>
>> Name feels like string. Symbol feels like "key".
>>
>
> Class and selector names should be symbolic.  They're keys to accessing
> specific objects in the system...
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200424/3c94b3c1/attachment.html>


More information about the Squeak-dev mailing list