The D Programming Language: cases

Chris Torek chris at mimsy.UUCP
Wed Mar 23 05:16:56 AEST 1988


In article <336 at wsccs.UUCP> terry at wsccs.UUCP (terry) writes:
>... Since the discussion centers around 'D', which by context is
>simply "a new standard C which may not be compatable with
>the current K&R standard of C so we'll call it 'D'",

That is not what *I* mean by `D'.  I thought we were discussing a
language that would be a replacement for C as a systems and/or
general-purpose programming language.

>I believe that "upward" compatability must be maintained if all C
>software is to be recompiled in D with minimal tweaking.

I had in mind more of an automatic translator (in which inserting
`fallthrough' statements would be trivial).  Of course this is largely
just an intellectual exercise anyway (and, some say, a light workout
at that :-) ).

>While a change this drastic [requiring `fallthrough' for case fallthrough]
>_could_ be worked around with something as simple as
>
>	#define case	fallthrough; case
>
>this does _not_ help code generators such as YACC and LEX generate this new
>code.

Actually, as it happens, both yacc and lex always generate the `break'
for you.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list