|[7 earlier articles]|
|Re: Overloaded logic operators firstname.lastname@example.org (Mike Austin) (2008-11-25)|
|Re: Overloaded logic operators email@example.com (Louis Krupp) (2008-11-25)|
|Re: Overloaded logic operators firstname.lastname@example.org (Dmitry A. Kazakov) (2008-11-25)|
|Re: Overloaded logic operators email@example.com (2008-11-25)|
|Re: Overloaded logic operators firstname.lastname@example.org (Bartc) (2008-11-25)|
|Re: Overloaded logic operators email@example.com (Chris Dodd) (2008-11-25)|
|Re: Overloaded logic operators firstname.lastname@example.org (2008-11-26)|
|Re: Overloaded logic operators email@example.com (Frank Swarbrick) (2008-11-27)|
|Re: Overloaded logic operators firstname.lastname@example.org (Tony Finch) (2008-12-01)|
|Re: Overloaded logic operators alexc@TheWorld.com (Alex Colvin) (2008-12-03)|
|Re: Overloaded logic operators email@example.com (Hans Aberg) (2008-12-04)|
|From:||firstname.lastname@example.org (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 <email@example.com> 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.