[comp.lang.ada] Keyword reuse.

sswarts@bbn.com (Scott Swart) (07/04/90)

I feel a little stupid.  I have been complaining for the last several months about
the fact that Ada doesn't have a reraise for exceptions.  Reading another post
today, I noticed that "raise;" in an exception handler reraises the exception.

OK, so I should have looked it up. But why reuse raise.  For that matter, why reuse
return, then, else, in and probably others.  To me using the same keyword in
different contexts is just confusing.  My best guess is that there was a requirement
for a maximum number of keywords so that the language would be "simple."  Does
anyone know the real explaination?


Scott Swarts

stt@inmet.inmet.com (07/06/90)

Re: reuse of keywords

There *is* a cost to adding reserved words.  The ones
I "run" into most often are "entry" and "select," where
I am minding my own business writing a simple queueing package,
or a simple menu package, and suddenly a bolt of lightning
out of the tasking side of Ada hits me and my identifiers
get declared RESERVED FOR MULTITASKING.

In any case, what in one person's view is "inappropriate reuse"
in another person's view is "appropriate overloading."
"Raise;" seems like an appropriate overloading to me,
but of course, I have read the "green book" so many times
that I dream in Ada... :-}

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138