Hi,

what is the canonical way to get a class from a symbol?

a) Converting symbol into class via string protocol

a.1) #Array asClass
I use this the most, because it is easy, uses unary selector, and so far
I've never ran into any issues. But apparently it is not good -- why?

a.2) #Array asClassInEnvironment: Smalltalk globals

b) Retriving the class by key from the system dictionary

b.1) Smalltalk globals at: #Array

b.2) Smalltalk at: #Array

b.3) Smalltalk classNamed: #Array

c) something else entirely?

I get that using #asClass wouldn't work if there was a different
environment, however I don't even know in what situation there could be a
different environment, so I cannot assert how problematic it is or isn't.

Thanks,
Peter

Reply via email to