On Aug 25, 2013, at 9:40 AM, Camille Teruel <[email protected]> wrote:
> > 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'? exactly > 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. this was already discussed. With #asClass and relatives what you have is a better abstraction jut because you are decoupled of "Smalltalk globals", it is not a big win now, but it open doors to better designs with environments, etc. At least, that was my understanding when the issue arise at the beginning. Esteban > > >> >> On 2013-08-24, at 17:55, Fernando Olivero <[email protected]> wrote: >>> I prefer to evaluate >>> >>> Smalltalk globals classNamed: #MyClass >>> >>> Fernando >>> >>> On Sat, Aug 24, 2013 at 11:57 AM, Stéphane Ducasse >>> <[email protected]> wrote: >>>> >>>> Is it >>>> >>>> asClass? >>>> >>>> Stef >>>> >>> >> >> > >
