[Pharo-dev] what is the new way to do Smalltalk at: #MyClass?
camille.teruel at gmail.com
Sun Aug 25 03:40:46 EDT 2013
On 24 août 2013, at 19:20, Camillo Bruni wrote:
> We have now:
> String >> #asClass
> String >> #asClassIfAbsent:
> String >> #asClassIfPresent:
I don't understand why we need this new way.
Is it just to avoid calling 'Smalltalk globals at: #MyClass'?
Because these names are confusing, and the 'as' prefix suggests a conversion while it's an access (with indirection but still a mere access).
And #asClass has no sender.
If you think 'Smalltalk globals at: #MyClass' is really too long to type, lets just create a new global ThisEnvironment := Smalltalk globals.
> On 2013-08-24, at 17:55, Fernando Olivero <fernando.olivero at usi.ch> wrote:
>> I prefer to evaluate
>> Smalltalk globals classNamed: #MyClass
>> On Sat, Aug 24, 2013 at 11:57 AM, Stéphane Ducasse
>> <stephane.ducasse at inria.fr> wrote:
>>> Is it
More information about the Pharo-dev