Yes that's a much needed one. I used it yesterday, after creating my own crOut, I quickly looked into Pharo2.0 to find these crLog, logCr et als..
Beginner stuff like this does make it lot easier for everyone, not just beginners..! We could borrow from all other languages if any like this.. On Thu, May 2, 2013 at 12:21 PM, stephane ducasse <stephane.duca...@free.fr>wrote: > + 1 > Let's propose a nice protocal and we use the rewrite tool for real! > This is also why I want > crLog > instead of Transcript show: > > Stef > > > Hi, all > > > > do not think that i am drunk or vent crazy, asking such silly > > question, which at best should be asked only by beginner :) > > > > I know the answer: > > > > Smalltalk at: #SomeName > > > > or > > > > Smalltalk globals at: #SomeName > > > > what stroke me, just now, that both answers is wrong! > > > > It should be: > > > > #SomeName asGlobal > > > > (or suggest more appropriate/precise method name for a symbol) > > > > optionally, we could also have one, with handling absent case: > > > > #SomeName asGlobalIfAbsent: [] > > > > same , but only if present: > > > > #SomeName asGlobalIfPresent: [:global | ] > > > > > > Currently, there is 941 references to 'Smalltalk' global in my pharo > image. > > If we introduce this convenience method, it will shrink this number > > considerably, > > not saying that code will be more elegant and concise compare: > > > > (Smalltalk globals at: #Foo) doSomething > > > > and > > > > #Foo asGlobal doSomething > > > > P.S. What really strikes me is why we don't have such method from very > > beginning, > > and instead refer to 'Smalltalk' all over the places. > > Some things are so deeply indoctrinated in our minds, that we don't > > even think that it can be different. > > > > -- > > Best regards, > > Igor Stasenko. > > > > >