[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OO no... here we gOO again...
On Mon, 24 Jul 2000, Stanislav Malyshev a.k.a Frodo wrote:
> IA>> what OO is, and that is a rather personal view. I heard some people say
> IA>> Java (which Sun dubs "pure OO", is not OO at all, since "if" statements
> IA>> are not objects and there are primitive types, others said that even
>
> Erm? Why if statements should be objects? ';' is not object too, so
> what? Does it automatically discard every language having ';' in syntax
> from being OO?
Let me clarify the muddy waters: in no language I'm aware of, is "if" an
object. In most sane languages (Scheme, Python, Smalltalk), a boolean is
an object. In smalltalk, a boolean has a method called ifTrue which
accepts a block. In smalltalk, I think, true and false are *derived* from
boolean. true's implementation of ifTrue executes the block, while false's
does nothing.
hence
x == y ifTrue [object message]
woule send message to object only if x indeed equals y. Note that this is
not a new idea -- lambda calculus works in similar ways.
--
Moshe Zadka <moshez@math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il