TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Tucker Taft <[log in to unmask]>
Thu, 15 Oct 1998 09:58:38 -0400
text/plain (29 lines)
> ...
> Just out of curiosity: Why wasn't this included as a feature of the
> language to begin with?

The same problem existed in Ada 83 with derived types (though obviously
not as critical), so we didn't feel the need to fix it.  Furthermore,
with C++ the primary competitor, we didn't feel a need to get too
"fancy".  Even Java didn't add this concept.  I agree it would be a good
thing, but there are so many "good" things out there that at some
point you need to pick and choose.  We did our best...

> ... And why a pragma instead of a keyword (as I
> suggested in my earlier post)?

A pragma can be added by any compiler at any time, and can easily
be ignored by compilers that don't support it.  A new keyword
requires all compilers to be updated.

Furthermore, the presence of the pragma on one overriding would
presumably mean that any other overridings without a pragma for
the same type would be rejected.  For a type with no pragmas,
the existing rules would apply, presumably.

Did you have the same rule in mind the same rule for new syntax?
If so, that's seems weird because it is syntax rather than a pragma.
If not, you have horrendous upward compatibility problems.

-Tuck

ATOM RSS1 RSS2