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.

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