From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Boolean Representation
Date: 1998/09/26
Date: 1998-09-26T00:00:00+00:00 [thread overview]
Message-ID: <Ezw8Et.57H.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: yecemt0kp9f.fsf@king.cts.com
Keith Thompson (kst@king.cts.com) wrote:
: ...
: Here's another interesting question. Suppose some perverse
: implementation used an internal representation of (False => 1, True => 0)
: for type Boolean, and generated extra code to make all the predefined
: operations work properly. A packed array of 32 Booleans, for example,
: would occupy 32 bits, but setting it to (others => True) would clear
: all 32 bits. I'm not suggesting that this would ever be a good idea,
: but would it actually violate the RM?
It is just this kind of thinking which led people to put "reconfirming"
representation clauses on enumeration types in Ada 83. What a waste
of energy! We added a rule in Ada 95 to save the paranoid from
writing all those silly enumeration representation clauses. I can
see we should have gone one step further, specifying the representation
for 1-bit boolean objects. Groan.
Please paranoid readers, don't go worrying about the possibility of
1-bit boolean objects having False = 1. Instead, let's all agree
to shun any Ada compiler which makes such an absurd choice... That's
ultimately much more effective than any words in a standard.
: --
: Keith Thompson (The_Other_Keith) kst@cts.com <http://www.ghoti.net/~kst> <*>
: Qualcomm, San Diego, California, USA <http://www.qualcomm.com>
--
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Burlington, MA USA
An AverStar Company
next prev parent reply other threads:[~1998-09-26 0:00 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-24 0:00 Boolean Representation matthew_snyder
1998-09-24 0:00 ` dennison
1998-09-24 0:00 ` Keith Thompson
1998-09-25 0:00 ` dennison
1998-09-25 0:00 ` Keith Thompson
1998-09-26 0:00 ` Tucker Taft [this message]
1998-09-26 0:00 ` Keith Thompson
1998-09-27 0:00 ` null pointer representation (was: Boolean Representation) Arthur Evans Jr
1998-09-27 0:00 ` Keith Thompson
1998-09-28 0:00 ` dewarr
1998-09-28 0:00 ` Keith Thompson
1998-09-28 0:00 ` dewarr
1998-09-30 0:00 ` Keith Thompson
1998-10-02 0:00 ` Robert I. Eachus
1998-09-28 0:00 ` Lieven Marchand
1998-09-27 0:00 ` Boolean Representation dewarr
1998-09-27 0:00 ` dewarr
1998-09-24 0:00 ` dewarr
1998-09-24 0:00 ` Samuel T. Harris
1998-09-25 0:00 ` dewarr
1998-09-27 0:00 ` Samuel T. Harris
1998-09-28 0:00 ` dewar
1998-09-24 0:00 ` matthew_snyder
1998-09-24 0:00 ` dennison
1998-09-24 0:00 ` Tom Moran
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` Tom Moran
1998-09-25 0:00 ` Robert I. Eachus
1998-09-25 0:00 ` dewarr
-- strict thread matches above, loose matches on Subject: below --
1998-09-24 0:00 matthew_snyder
1998-09-25 0:00 ` Tucker Taft
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` dewarr
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox