comp.lang.ada
 help / color / mirror / Atom feed
From: "Mike Silva" <mjsilva@jps.net>
Subject: Re: Printing Enum Variable Re: Linux World
Date: 1999/03/10
Date: 1999-03-10T00:00:00+00:00	[thread overview]
Message-ID: <7c6ad2$8t3$1@its.hooked.net> (raw)
In-Reply-To: 7c4ru6$e45$1@remarQ.com


Michael Young wrote in message <7c4ru6$e45$1@remarQ.com>...
<...>
>I view these as design issues, not really coding problems. Who wants to
know
>what color the traffic light is, and why? My first guess is that a state
>machine is a more appropriate abstraction.

But enumerations (in whatever language) are ideal for representing these
states.

>Likewise for your co-workers'
>political views: these might be better captured as polymorphic behaviors.

Possibly, but at some point somebody is going to want to identify those
views (e.g. to get each person on the right mailing list), and again
enumerations are ideal.  In addition, you can do things like defining an
array of Political_Slate records over the enumeration, which is a very clean
and close match to the actual situation.

> With
>that said, there is no getting around the neutral nature of storage media.
>From now until some enlightened future, these attributes will likely be
stored
>as coded numeric values in databases. This will always be a weak link,
since
>somebody outside the development staff can change the coding to your
>detriment.

I don't understand this.  If somebody can break your data encoding spec
after the fact then there's no end to your troubles.

I like enumerations, but I don't see the appropriateness of enumerations as
an Ada vs. C++ issue.  I use them whereever I can in both languages.  I *do*
enjoy the extra Ada attribute support (constructs such as
  for index in Political_Spectrum'Range loop
are pleasingly elegant, IMHO).  In fact I find Ada attributes in general
quite nice.

Mike









  reply	other threads:[~1999-03-10  0:00 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-02  0:00 Linux World Richard D Riehle
1999-03-02  0:00 ` fraser
1999-03-02  0:00   ` Printing Enum Variable " David Starner
1999-03-03  0:00     ` fraser
1999-03-03  0:00       ` David Starner
1999-03-03  0:00         ` fraser
1999-03-03  0:00         ` Samuel T. Harris
1999-03-04  0:00         ` robert_dewar
1999-03-03  0:00           ` David Starner
1999-03-04  0:00             ` Samuel Mize
1999-03-04  0:00               ` Samuel Mize
1999-03-05  0:00                 ` Robert A Duff
1999-03-05  0:00               ` Robert A Duff
1999-03-07  0:00               ` Florian Weimer
1999-03-07  0:00                 ` Michael Young
1999-03-07  0:00                   ` Larry Kilgallen
1999-03-07  0:00                     ` Michael Young
1999-03-08  0:00                       ` robert_dewar
1999-03-08  0:00                         ` Richard D Riehle
1999-03-09  0:00                           ` Michael Young
1999-03-09  0:00                             ` Larry Kilgallen
1999-03-09  0:00                               ` billy
1999-03-10  0:00                                 ` robert_dewar
1999-03-10  0:00                                   ` Dale Stanbrough
1999-03-10  0:00                                     ` dennison
1999-03-10  0:00                                       ` bob
1999-03-10  0:00                                         ` Mike Silva
1999-03-10  0:00                                           ` dennison
1999-03-10  0:00                                           ` Nick Roberts
1999-03-10  0:00                                     ` Pascal Obry
1999-03-10  0:00                                     ` Richard D Riehle
1999-03-10  0:00                                 ` Pascal Obry
1999-03-09  0:00                               ` Michael Young
1999-03-10  0:00                                 ` Mike Silva [this message]
     [not found]                               ` <7 <7c58qa$b6b$1@cf01.edf.fr>
1999-03-10  0:00                                 ` fraser
     [not found]                               ` <7c4ru6$e45$1@remarq.com>
1999-03-10  0:00                                 ` fraser
     [not found]                             ` <1999Mar9.131659. <dale-1003991644340001@r1021c-07.ppp.cs.rmit.edu.au>
1999-03-10  0:00                               ` Larry Kilgallen
1999-03-08  0:00                       ` Florian Weimer
1999-03-08  0:00                       ` Larry Kilgallen
1999-03-08  0:00                         ` robert_dewar
1999-03-07  0:00                   ` Matthew Heaney
1999-03-08  0:00                     ` Michael Young
1999-03-08  0:00                       ` Matthew Heaney
1999-03-04  0:00             ` robert_dewar
1999-03-04  0:00           ` Ehud Lamm
1999-03-05  0:00             ` Richard D Riehle
1999-03-05  0:00               ` Nick Roberts
1999-03-06  0:00                 ` Ehud Lamm
1999-03-06  0:00                   ` robert_dewar
1999-03-06  0:00                     ` Ehud Lamm
1999-03-06  0:00                     ` Larry Kilgallen
1999-03-06  0:00                       ` Dave Taylor
1999-03-06  0:00                         ` Bruce or Tracy
1999-03-04  0:00         ` dennison
1999-03-04  0:00           ` Ehud Lamm
1999-03-03  0:00     ` Fraser Wilson
1999-03-03  0:00       ` David Starner
1999-03-04  0:00         ` Magnus Larsson
1999-03-03  0:00           ` Printing Enum Variable Re: Linux World (Correction) Hans Marqvardsen
1999-03-03  0:00           ` Printing Enum Variable Re: Linux World Hans Marqvardsen
1999-03-04  0:00             ` Nick Roberts
1999-03-04  0:00             ` robert_dewar
1999-03-04  0:00               ` Hans Marqvardsen
1999-03-05  0:00                 ` Larry Kilgallen
1999-03-05  0:00                 ` dewar
1999-03-05  0:00                   ` David Botton
1999-03-05  0:00                     ` robert_dewar
1999-03-04  0:00               ` Hans Marqvardsen
1999-03-05  0:00                 ` dewar
1999-03-07  0:00                   ` Hans Marqvardsen
1999-03-04  0:00         ` fraser
1999-03-05  0:00           ` Nick Roberts
1999-03-05  0:00             ` fraser
1999-03-04  0:00         ` Richard D Riehle
1999-03-04  0:00         ` Richard D Riehle
1999-03-04  0:00         ` robert_dewar
1999-03-03  0:00     ` Larry Kilgallen
1999-03-03  0:00       ` Nick Roberts
1999-03-03  0:00         ` David Starner
replies disabled

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