[squeak-dev] The Trunk: Graphics-mt.430.mcz
Tobias Pape
Das.Linux at gmx.de
Fri Apr 24 17:48:38 UTC 2020
> On 24.04.2020, at 18:41, Jakob Reschke <forums.jakob at resfarm.de> wrote:
>
> 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.
Do you know that classNamed supports this?
Smalltalk classNamed: 'Morph class'
Best regards
-Tobias
>
> 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...
>>
>
>
More information about the Squeak-dev
mailing list
|