Rationale for Ada 2005

John Barnes
Contents   Index   References   Search   Previous   Next 

2.2 Reserved words

Ada 2005 has three further reserved words namely interface, overriding, and synchronized. Readers may recall that Ada 95 had six more reserved words than Ada 83 and the fact that this meant that some programs were incompatible and thus had to be rewritten loomed large in the minds of many commentators.
When new syntax for the introduction of interfaces was being discussed it was strongly felt that incompatibilities should be avoided and that any new syntax words should be unreserved. It was also noted that Interface was a popular identifier and that making it a reserved word would cause many programs to have to be rewritten.
However, it was soon realised that treating Interface as unreserved would have permitted sequences such as 
type T is interface;
subtype Interface is T;
in which Interface is a subtype of the interface T. This would have been total madness. Some reviewers also had memories of PL/I in which words such as IF were not reserved so that one could write IF IF ... where the first IF is a syntax word and the second is a user identifier.
Accordingly it was decided that the new words would have to be reserved. No sensible alternative to interface could be thought of although it would be irritating for users who had packages called Interface – actually a brief survey revealed that most such packages had longer names such as Radar_Interface so that the problem was more apparent than real. The other new reserved words overriding and synchronized clearly present less of a problem since they are less likely to have been used as identifiers.

Contents   Index   References   Search   Previous   Next 
© 2005, 2006, 2007 John Barnes Informatics.
Sponsored in part by:
The Ada Resource Association and its member companies: ARA Members AdaCore Polyspace Technologies Praxis Critical Systems IBM Rational Sofcheck and   Ada-Europe:
Ada-Europe