Hi Dmitry,

you found it yourself, sort of!

Le 31/10/2016 à 14:25, CodeDmitry a écrit :
Wait, so unlike JavaScript; True and False are actual singletons and
ifTrue/ifFalse/ifTrue:ifFalse: uses visitor pattern to have the actual True
or False handle the block rather than doing it themselves?

Yes, true and false are singletons (resp single instance of the True class, False class).

No, this is not a visitor pattern, just polymorphism (True and False have their own implementation of ifTrue:/ifFalse:/ifTrue:ifFalse:/ifFalse:ifTrue:).

Regards,

Thierry

Reply via email to