Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rochester!rutgers!husc6!cmcl2!brl-adm!adm!dsill@NSWC-OAS.arpa
From: dsill@NSWC-OAS.arpa (Dave Sill)
Newsgroups: comp.lang.c
Subject: Re: aggregate constants (in this case, unions)
Message-ID: <8413@brl-adm.ARPA>
Date: Wed, 22-Jul-87 16:10:12 EDT
Article-I.D.: brl-adm.8413
Posted: Wed Jul 22 16:10:12 1987
Date-Received: Fri, 24-Jul-87 06:11:27 EDT
Sender: news@brl-adm.ARPA
Lines: 51

Chris Torek  wrote:
>This sort of thing is why I claim that the single most important
>omission in C is aggregate constant types.  Other deficiencies
>include the odd semantics of `break' vs. `continue' ...

I always thought they were straightforward.  `break' effectively does
a `goto' to the statement following the innermost `while', `do',
`for', or `switch', right?  `continue' does an effective `goto' to the
continuation test of a looping statement.

>and switch
>statements, and the default fall through from one switch case to
>another.

This *is* kind of tricky, but then this language is full of tricks.
One of the things I like about C is that it allows me to do things
that can't be done (as efficiently or cleanly) in other languages.
This is one of those things.  BTW, wasn't lint's /*FALLTHROUGH*/
supposed to help here?  (It's not implemented by any of our lint's,
though.)

>Nonetheless, these are all part of the language we know
>and .  I think it is silly to
>make major changes to a language without also renaming that language.

Agreed.

>(E.g., the difference between FORTRAN 77 and FORTRAN 66 is sufficient
>that the 1977 standard should have been called something else.
>FORTRAN 8X also should not be called `FORTRAN'.  But this is ruled
>by politics, not logic.  

Especially bad when valid FORTRAN 66 code is invalid under FORTRAN 77.
(Character constants, for example.)  DEC, at least, has made their
FORTRANs upwardly compatible, so far.

>[Attaching the standard date to the base
>name suffices, but people often talk about code written in `FORTRAN'
>without specifying *which* FORTRAN.  I have seen this lead to what
>I can only call `interesting misunderstandings'....])

This is understandable, if not excusable.  Programmers, of all people,
should be aware of the dangers of imprecision.  Don't get me wrong, I
agree that different languages should have different names.  But it's
convenient to name the successor after the original.  I think Wirth did
the right thing with Pascal and Modula-2, but I can't help but wonder
if Modula would have been more widely adopted if it had been given the
Pascal nameplate.

-Dave Sill
 dsill@nswc-oas.arpa