comp.lang.ada
 help / color / mirror / Atom feed
From: cs.utexas.edu!utnut!utcsri!csri.toronto.edu!blaak@uunet.uu.net  (Raymond
Subject: thoughts on "holey" enumerated types
Date: 11 Sep 93 23:23:54 GMT	[thread overview]
Message-ID: <1993Sep11.192353.19703@jarvis.csri.toronto.edu> (raw)

The thread on converting integers to a sparse enumerated type has got
me thinking.

Couldn't enumerated types always be implemented as a contiguous range, such
that use clauses to specify member ``positions'' just affected the 'POS and
'VAL functions?

That way enumerated type operations (especially loop traversal over a range,
or array indexing) can always be efficient. The only time one needs to know a
member's position is when converting to an integer. Using 'POS and 'VAL seems
safer than unchecked_conversion in these cases anyway.

Ray
blaak@csri.toronto.edu

             reply	other threads:[~1993-09-11 23:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-11 23:23 cs.utexas.edu!utnut!utcsri!csri.toronto.edu!blaak [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-09-12 18:02 thoughts on "holey" enumerated types agate!howland.reston.ans.net!usc!cs.utexas.edu!csc.ti.com!tilde.csc.ti.co
1993-09-12 20:13 agate!howland.reston.ans.net!noc.near.net!inmet!bobduff
1993-09-12 21:45 Michael Feldman
1993-09-12 21:51 Michael Feldman
1993-09-13 14:24 john r strohm
1993-09-13 15:33 David Emery
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox