What are pragmas for, ideally? I've only seen them mentioned in the context of flagging menu items. (And I know some of the frameworks like Seaside use them to mark http GET / POST etc handlers).
On Thu, Apr 9, 2015 at 2:34 PM, Esteban Lorenzano <[email protected]> wrote: > > On 09 Apr 2015, at 20:32, Dmitri Zagidulin <[email protected]> wrote: > > +1 to standardizing #uniqueInstance. > > but as I said… not always. > > > Also, would it be appropriate to mark intended singleton creation methods > with a pragma? (So that they could be flagged as special in the UI, etc). > > no, we should not abuse the use of pragmas. > tools can recognise appropriate selectors (like it happens with > initialisation, etc.) without need to pollute the code. > > Esteban > > > On Wed, Apr 8, 2015 at 6:21 AM, Esteban Lorenzano <[email protected]> > wrote: > >> >> On 08 Apr 2015, at 12:01, Peter Uhnák <[email protected]> wrote: >> >> On Wed, Apr 8, 2015 at 11:52 AM, Esteban Lorenzano <[email protected]> >> wrote: >> >>> >>> > On 08 Apr 2015, at 11:37, Yuriy Tymchuk <[email protected]> wrote: >>> > >>> > Sometimes I use #new >>> that’s horrible! >>> completely misleading >>> >> >> I'm curious, if it is singleton, should you worry from outside about the >> fact that it is a singleton? Shouldn't that be hidden from the user? >> >> nope. >> new means new. >> you are confusing your user if you send a new message and you receive an >> already existing (aka not new) object. >> the literature existing always recommend to use an specific method >> (usually #instance or #uniqueInstance, in smalltalk.. who decided to use >> #uniqueInstance as a convention). >> >> Esteban >> >> >> Peter >> >> >> > >
