For the full story, these objects and ifTrue: etc are special cases in the
VM code.

For speed.

Phil

On Mon, Oct 31, 2016 at 3:32 PM, CodeDmitry <dimamakh...@gmail.com> wrote:

> I realized it a bit before you posted but thanks for confirming.
>
> Boolean seems to indeed just be a "Dynamic Interface"; since Smalltalk does
> not have "Java Interfaces"(nor want them for the same reason JavaScript
> doesn't), the developers wanted to still have True and False be subclasses
> of Booleans.
>
> In all honesty Boolean seems to be there purely for the "common sense" of
> it, rather than need. Smalltalk is duck typed and has no need for
> interfaces. If it's a Boolean, you know it has those methods so Boolean is
> not actually useful for anything; True and False may as well just be
> subclasses of Object.
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/How-
> does-Boolean-ifTrue-work-tp4920873p4920891.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
>

Reply via email to