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

Marcel Taeumel marcel.taeumel at hpi.de
Fri Apr 24 17:07:51 UTC 2020


> But you already know that this is a class name...


That's not the point. I am arguing for simplicity and discoverability. You arguing in favor of some implementation detail for a performance gain. That's not a good path ... ;-) #classNamed: is confusing in this regard. There should be a #classAt: if you want the client to specify an identifier.

Best,
Marcel
Am 24.04.2020 18:41:39 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
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 [mailto: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 [mailto:asqueaker at gmail.com]>:
On Tue, Apr 21, 2020 at 5:37 AM Marcel Taeumel <marcel.taeumel at hpi.de [mailto: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/6cae1a6c/attachment.html>


More information about the Squeak-dev mailing list