> On 21 Jan 2017, at 11:59, Peter Uhnak <i.uh...@gmail.com> 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 it was not a singleton.
>> 
>> A singleton is often:
>>       you **CANNOT** have  two instances at the same time.
>> 
>> Many people do not use well singleton so watch out.
> 
> We have several variations of singletons in the Pharo codebase, some of which 
> do allow multiple instances, some of which don't. But they are differentiated 
> by names.
> 
> https://www.peteruhnak.com/blog/2015/12/06/singleton-variations/

That's a good summary, thanks Peter.

> Peter
> 
>> 
>> Stef
>> 
>> On Thu, 19 Jan 2017 11:23:21 +0100, Siemen Baader
>> <siemenbaa...@gmail.com> 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..)
>>> 
>>> -- Siemen
>> 
>> 
>> 
>> -- 
>> Using Opera's mail client: http://www.opera.com/mail/
> 


Reply via email to