[Pharo-users] Traits for class methods?

Hilaire hilaire at drgeo.eu
Wed Feb 13 08:39:54 EST 2019


I am wondering. Does it not make responsabilities less clear, shareed in
class hierarchy and traits hierarchy, now both in term of behavior but
also state?

Hilaire

Le 13/02/2019 à 13:02, Marcus Denker a écrit :
> 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.
>
> 	Marcus

-- 
Dr. Geo
http://drgeo.eu





More information about the Pharo-users mailing list