From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_40,LOTS_OF_MONEY, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 14 Jan 92 21:39:18 GMT From: taurus!aldebaran!schweige@lll-winken.llnl.gov (Jeffrey M. Schweiger) Subject: Re: Ada statement Message-ID: <3848@aldebaran.cs.nps.navy.mil> List-Id: In article <1992Jan14.031331.18320@cs.rose-hulman.edu> eigenstr@zoe.cs.rose-hul man.edu (Todd R. Eigenschink) writes: |I'm taking CS404 here, the compilers class, and this quarter, we're |compiling a subset of Ada (We're using the book _Crafting_A_Compiler_ by |Charles Fischer and Richard LeBlanc, Jr., should anyone care.). I used |Ada for two data structures classes last year, but never really thought |about this then. And now...the $64,000 question.... | | Why the HELL is there the NULL statement????????????? | |There's only one use as far as I can tell...to fill an empty procedure/ |function declaration so that the body isn't empty. So why not just allow |an empty body? The 'null' statement exists because the syntax demands that there be a statement at a particular place in a program (and not just restricted to function and procedure bodies), but is used if there is nothing to be done at this point. It should be noted the C also uses the null statement (";"), see K&R, 2nd edition, page 18). |It's not like this is a big deal...compiling that is a piece of cake. Here's |the code from my semantic routine to compile said statement: | |void null_statement(void) |{ | smPopStack(TOSS); /* Remove the semicolon from the semantic stack | and heave it. */ | smPopStack(TOSS); /* Remove the NULL from the ss and do the same. */ |} | |Hey, don't get on my case just 'cuz I'm writing it in C...I think Ada's |tolerable, and I love generic packages, but I just find it a little too |restrictive for someone who knows what HE's doing (so shoot me for |being politically incorrect) and wants to get something done NOW. So tell me, what can't you do in Ada that you can do in C (not necessarily by the same method, and with the same ease)? I'm not saying that one language might not be better than another for specific applications, but I felt your comment merited some response. I don't view it as a case of 'political correctness.' Ada compilers have been written in Ada. [deleted] |Todd Eigenschink |eigenstr@CS.Rose-Hulman.Edu Jeff Schweiger -- ******************************************************************************* Jeff Schweiger Standard Disclaimer CompuServe: 74236,1645 Internet (Milnet): schweige@taurus.cs.nps.navy.mil *******************************************************************************