comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: Flags in Ada?
Date: 27 Oct 1994 05:06:48 GMT
Date: 1994-10-27T05:06:48+00:00	[thread overview]
Message-ID: <38nch8$bdv@news.delphi.com> (raw)

>Most of the techniques that have been proposed for this use packed
>boolean and representation specs within the visibile part of the
>package spec.  My experience is that this can be a dangerous approach,
>particularly for portability.
>
  ...
> package POSIX is
>  ...
>    type Option_Set is private;

Where is the conceptual focus?  If the important object is the set of
flags (Option_Set here), then certainly it should be dealt with as an
entity - either hiding the implementation details as per your example
or exposing it as an array of booleans (packed if interfacing or
other reasons so indicate).  But if the 'flags' are in fact logically
heterogenous data, that just happen to be tossed together to match
some external interface, then, like all heterogeneous data, they should
be in a record, not an array.  If it's just an interfacing requirement
that names and places the bits, it seems to me that like all system
dependencies their specification should be buried inside a package which
exports a clean, logical, and portable view of their relevant information.



             reply	other threads:[~1994-10-27  5:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-27  5:06 tmoran [this message]
1994-10-27 13:47 ` Flags in Ada? Robert Dewar
1994-10-28  2:41   ` Tucker Taft
1994-10-30 13:31     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1994-10-28  3:59 tmoran
1994-10-28 13:43 ` Robert Dewar
1994-10-31 14:19   ` Norman H. Cohen
1994-11-02 14:06     ` Mats Weber
1994-11-03 23:08       ` Robert Dewar
1994-11-03 11:26     ` Robert Dewar
1994-10-27  5:05 tmoran
1994-10-27 13:29 ` Robert Dewar
1994-10-27 17:15 ` Norman H. Cohen
1994-10-28  3:51   ` Robert Dewar
1994-10-25 16:22 tmoran
1994-10-25 10:36 Andre Spiegel
1994-10-25 10:07 ` David Emery
1994-10-25 16:19 ` Norman H. Cohen
1994-10-26  3:19   ` tmoran
1994-10-26  9:59     ` David Emery
1994-10-26 22:32       ` Robert Dewar
1994-10-27 13:24         ` Norman H. Cohen
1994-10-27 15:15         ` John Volan
1994-10-31  9:29         ` David Emery
1994-10-27 22:34       ` Henry G. Baker
1994-10-26 14:33     ` Robert Dewar
1994-10-26 17:43     ` Norman H. Cohen
1994-10-26 15:54   ` Andre Spiegel
1994-10-26  0:36 ` Dale Stanbrough
1994-10-26 11:01   ` Robert Dewar
1994-10-27  8:23 ` Henri Altarac
1994-10-27 23:00   ` Robert Dewar
1994-10-31  9:32     ` 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