2016-10-31 11:32 GMT-03:00 CodeDmitry <dimamakh...@gmail.com>:
> 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.

Not exactly, look at the methods in Boolean and you'll see many
methods are common to all.

So Boolean has a reason to be the superclass of both True and False.



Esteban A. Maringolo

Reply via email to