comp.lang.ada
 help / color / mirror / Atom feed
From: ads.com!saturn!bhanafee@ames.arc.nasa.gov  (Brian Hanafee)
Subject: Re: Ada statement
Date: 14 Jan 92 19:18:36 GMT	[thread overview]
Message-ID: <BHANAFEE.92Jan14111836@deimos.ads.com> (raw)

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

             reply	other threads:[~1992-01-14 19:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-01-14 19:18 Brian Hanafee [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-01-15 17:37 Ada statement bu.edu!rpi!usenet.coe.montana.edu!ogicse!verdix!brucej
1992-01-15 17:13 Stan McQueen
1992-01-15 15:11 Greg Harvey
1992-01-15  6:09 dog.ee.lbl.gov!network.ucsd.edu!usc!sdd.hp.com!uakari.primate.wisc.edu!us
1992-01-15  6:04 csus.edu!wupost!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!nntp.uorego
1992-01-15  1:15 dog.ee.lbl.gov!network.ucsd.edu!swrinde!mips!zaphod.mps.ohio-state.edu!so
1992-01-14 22:16 Jim Giles
1992-01-14 21:39 Jeffrey M. Schweiger
1992-01-14 20:49 david.c.willett
1992-01-14  3:13 csus.edu!wupost!spool.mu.edu!news.cs.indiana.edu!bronze!master.cs.rose-hu
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox