From: fraser@synopsys.com.com
Subject: Re: Printing Enum Variable Re: Linux World
Date: 1999/03/03
Date: 1999-03-03T00:00:00+00:00 [thread overview]
Message-ID: <920499183.209.20@news.remarQ.com> (raw)
In-Reply-To: 36DDA761.7B4E8099@aasaa.ofe.org
I nearly cried when dstarner98@aasaa.ofe.org said:
>I never meant this as an attack on Ada. It just that complaining about C
>for lack of enumeration strings is as appropriate as complaining about
>Ada for lack of a "?:" operator. It's not that big a deal.
Believe me, I'd have to kill myself if I got narky whenever someone
said that a feature in Ada is not necessarily positive. But you're
still wrong :)
I see the enumeration string thing itself as being minor. However,
consider what being able to provide that feature means: enumerations
are actual, real live types just as, say, integers are. Having an Image
attribute is a big flag that says an enumeration is something more than
just a convenience; it says that the language supports it, nutures it,
and holds it when it cries.
I think that your comment about a similar operation in C being inconsistent
with the semantics of an enum in that language is telling: it shows that
they're not really there. They're just window dressing.
Attributes indicate a lot about the type system. For an array object X,
being able to write X'Range, X'First, X'Last etc. tells you that Ada
has a lot of support for what arrays actually are. The fact that these
things are not available in C (not even X'First in the general case [1])
tells you how C feels about the construct. It doesn't have arrays, it
has chunks of memory that you can allocate in a single declaration.
Big whoop.
This is, of course, completely informal. But a programming language is
more than just a reference manual, it's a style as well.
Oh, and sorry for the purpleness of the above.
Fraser.
[1] there's a C idiom that goes char a[100]; char *b = a-1; which gives
you an array b from 1 to 100. Sure, it violates the standard, but name
a compiler that rejects and I'll give you twelve zorkmids.
next prev parent reply other threads:[~1999-03-03 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 Wilson
1999-03-03 0:00 ` David Starner
1999-03-04 0:00 ` fraser
1999-03-05 0:00 ` Nick Roberts
1999-03-05 0:00 ` fraser
1999-03-04 0:00 ` Magnus Larsson
1999-03-03 0:00 ` Hans Marqvardsen
1999-03-04 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 ` 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 ` Nick Roberts
1999-03-03 0:00 ` Printing Enum Variable Re: Linux World (Correction) Hans Marqvardsen
1999-03-04 0:00 ` Printing Enum Variable Re: Linux World Richard D Riehle
1999-03-04 0:00 ` robert_dewar
1999-03-04 0:00 ` Richard D Riehle
1999-03-03 0:00 ` Larry Kilgallen
1999-03-03 0:00 ` Nick Roberts
1999-03-03 0:00 ` David Starner
1999-03-03 0:00 ` fraser
1999-03-03 0:00 ` David Starner
1999-03-03 0:00 ` fraser [this message]
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 ` Matthew Heaney
1999-03-08 0:00 ` Michael Young
1999-03-08 0:00 ` Matthew Heaney
1999-03-07 0:00 ` Larry Kilgallen
1999-03-07 0:00 ` Michael Young
1999-03-08 0:00 ` Larry Kilgallen
1999-03-08 0:00 ` robert_dewar
1999-03-08 0:00 ` Florian Weimer
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 ` Nick Roberts
1999-03-10 0:00 ` dennison
1999-03-10 0:00 ` Richard D Riehle
1999-03-10 0:00 ` Pascal Obry
1999-03-10 0:00 ` Pascal Obry
1999-03-09 0:00 ` Michael Young
1999-03-10 0:00 ` Mike Silva
[not found] ` <7c4ru6$e45$1@remarq.com>
1999-03-10 0:00 ` fraser
[not found] ` <7 <7c58qa$b6b$1@cf01.edf.fr>
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-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 ` Larry Kilgallen
1999-03-06 0:00 ` Dave Taylor
1999-03-06 0:00 ` Bruce or Tracy
1999-03-06 0:00 ` Ehud Lamm
1999-03-04 0:00 ` dennison
1999-03-04 0:00 ` Ehud Lamm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox