|[7 earlier articles]|
|Re: Overloaded logic operators email@example.com (Mike Austin) (2008-11-25)|
|Re: Overloaded logic operators firstname.lastname@example.org (Louis Krupp) (2008-11-25)|
|Re: Overloaded logic operators email@example.com (Dmitry A. Kazakov) (2008-11-25)|
|Re: Overloaded logic operators firstname.lastname@example.org (2008-11-25)|
|Re: Overloaded logic operators email@example.com (Bartc) (2008-11-25)|
|Re: Overloaded logic operators firstname.lastname@example.org (Chris Dodd) (2008-11-25)|
|Re: Overloaded logic operators email@example.com (2008-11-26)|
|Re: Overloaded logic operators firstname.lastname@example.org (Frank Swarbrick) (2008-11-27)|
|Re: Overloaded logic operators email@example.com (Tony Finch) (2008-12-01)|
|Re: Overloaded logic operators alexc@TheWorld.com (Alex Colvin) (2008-12-03)|
|Re: Overloaded logic operators firstname.lastname@example.org (Hans Aberg) (2008-12-04)|
|From:||email@example.com (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)|
|Date:||Wed, 26 Nov 2008 12:10:43 +0100|
|Organization:||Department of Computer Science, University of Copenhagen|
|References:||08-11-110 08-11-115 08-11-121|
|Posted-Date:||27 Nov 2008 11:59:50 EST|
Mike Austin <firstname.lastname@example.org> writes:
> Torben Fgidius Mogensen wrote:
>> Option 2 is chosen by some scripting languages and "p and q" is
>> typically equivalent to "if p == null then p else q" and "p or q"
>> equivalent to "if p == null then q else p", so very similar to C's
>> sequential operators. [...] If you have an Object class (top of the
>> inheritance hierarchy), this might be used [as True].
> I like this idea of nil and Object. true needs false... now you've got two
> falsey values - and it's all downhill from there :)
If you let null be false and the non-null Object be true, you don't
need a separate boolean type.
> Do you know of languages which use this technique?
I can't offhand remember any specific instances.
Return to the
Search the comp.compilers archives again.