[Pharo-users] Traits for class methods?

Konrad Hinsen konrad.hinsen at fastmail.net
Wed Feb 13 09:30:15 EST 2019

Marcus Denker <marcus.denker at inria.fr> writes:

> It is amazing how much better this feels now that Traits can define state, too… (compared to before where it was just methods).
> 	https://github.com/khinsen/SingletonTrait/blob/master/SingletonTrait/SingletonTrait.trait.st
> I would even want to have (and use) a Trait like that in the system by default.

That's what I thought as well when I saw the 43 implementors of
uniqueInstance in Pharo.

I'll package this as a pull request for Pharo!


More information about the Pharo-users mailing list