Yes I like your blog entry.
But my point is orthogonal :)
On Sat, Jan 21, 2017 at 11:19:24AM +0100, stepharong wrote:
Pay attention that Singleton should not be about access but time.
If you can by adding on instance variable avoid to need a singleton
then it means that it was not a
> On 21 Jan 2017, at 11:59, Peter Uhnak wrote:
>
> On Sat, Jan 21, 2017 at 11:19:24AM +0100, stepharong wrote:
>> Pay attention that Singleton should not be about access but time.
>>
>> If you can by adding on instance variable avoid to need a singleton
>> then it means that
On Sat, Jan 21, 2017 at 11:19:24AM +0100, stepharong wrote:
> Pay attention that Singleton should not be about access but time.
>
> If you can by adding on instance variable avoid to need a singleton
> then it means that it was not a singleton.
>
> A singleton is often:
>you **CANNOT**
Pay attention that Singleton should not be about access but time.
If you can by adding on instance variable avoid to need a singleton then
it means that it was not a singleton.
A singleton is often:
you **CANNOT** have two instances at the same time.
Many people do not use well
On Thu, Jan 19, 2017 at 3:51 PM, Siemen Baader
wrote:
>
> On Thu, Jan 19, 2017 at 11:33 AM, Cyril Ferlicot D. <
> cyril.ferli...@gmail.com> wrote:
>
>>
>> You just need a class variable #UniqueInstance and those methods:
>>
>> current
>> "Can also be named #default or
On 19/01/2017 15:51, Siemen Baader wrote:
>
> Wouldn't a class instance variable be better? I want new singletons for
> every subclass.
> http://rmod-pharo-mooc.lille.inria.fr/MOOC/Slides/Week3/C019-W3S03-Basic-Variables.pdf
I use a class variable because I try to avoid a maximum the use of the
Am 19.01.17 um 15:51 schrieb Siemen Baader:
Wouldn't a class instance variable be better? I want new singletons
for every subclass.
http://rmod-pharo-mooc.lille.inria.fr/MOOC/Slides/Week3/C019-W3S03-Basic-Variables.pdf
I would also have used super new, why BasicNew? But my wish to create
On Thu, Jan 19, 2017 at 11:33 AM, Cyril Ferlicot D. <
cyril.ferli...@gmail.com> wrote:
>
> You just need a class variable #UniqueInstance and those methods:
>
> current
> "Can also be named #default or #instance"
> ^ UniqueInstance
> ifNil: [ UniqueInstance := self
On Thu, Jan 19, 2017 at 11:37 AM, Sven Van Caekenberghe
wrote:
> The Traits would be cool to standardise the behaviour and to mark it as
> such (implicit documentation)
Exactly.
> , however, Traits cannot add instance/class variables IIUC, that limits
> what they can do (and
2017-01-19 11:37 GMT+01:00 Sven Van Caekenberghe :
> The Traits would be cool to standardise the behaviour and to mark it as
> such (implicit documentation), however, Traits cannot add instance/class
> variables IIUC, that limits what they can do (and would make it more than
> one
The Traits would be cool to standardise the behaviour and to mark it as such
(implicit documentation), however, Traits cannot add instance/class variables
IIUC, that limits what they can do (and would make it more than one step).
> On 19 Jan 2017, at 11:33, Cyril Ferlicot D.
On 19/01/2017 11:23, Siemen Baader wrote:
> Is there a trait to quickly create singletons in Pharo, along the way of
> the Ruby Singleton mixin?
>
> https://ruby-doc.org/stdlib-1.9.3/libdoc/singleton/rdoc/Singleton.html
>
> (and ideally also observer/observable, which I am going to need next..)
Is there a trait to quickly create singletons in Pharo, along the way of
the Ruby Singleton mixin?
https://ruby-doc.org/stdlib-1.9.3/libdoc/singleton/rdoc/Singleton.html
(and ideally also observer/observable, which I am going to need next..)
-- Siemen
13 matches
Mail list logo