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.8 required=3.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 14 Jan 92 19:18:36 GMT From: ads.com!saturn!bhanafee@ames.arc.nasa.gov (Brian Hanafee) Subject: Re: Ada statement Message-ID: List-Id: In article <1992Jan14.031331.18320@cs.rose-hulman.edu> eigenstr@zoe.cs.rose-hul man.edu (Todd R. Eigenschink) writes: [stuff deleted] > > 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? I also use the explicit null to fill case statements (when OTHERS=> null;) and, in some cases, exception handlers. I would prefer to put in the explicit null, because it provides some assurance that an empty body is actually what I want. This is particularly an issue in units with long comments. For example, if I have a stub body with a lot of comments about how it should be implemented (maybe even some PDL), it is handy to have an explicit null as a placeholder. The explicit null also makes the grammar cleaner; null_statement couldn't be defined to be "", because the grammer would be impossible to parse. Instead, you would have to change the definition of sequence_of_statements. You can see the problem a little better by taking a close look at LRM 5.1/2. [stuff deleted] >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. [stuff deleted] There are some important differences between software development in college and in the real world. First, most programmers spend more time working on other people's code than on their own. Second, the life cycle of a program is much longer (certainly more than a couple semesters), so you may have to revisit your code long after you've forgotten it. Remember also that in the real world, you write a lot more code, so it is harder to remember everything you've done. Testing in the real world is also a lot more severe. >P.S. In case you've got anything nasty to say about writing it in C... >we're having it compile to VAX/11 assembler code...Blech! :) What does the target language have to do with the language of the compiler? Compiling to assembler code is actually quite common. Ideally, a vendor writes only one front end per language and one code generator per target, then mixes and matches to get whatever compiler is desired. Much easier said than done. -- Brian Hanafee Advanced Decision Systems bhanafee@ads.com 1500 Plymouth Street (415) 960-7300 Mountain View, CA 94043-1230