Ada Design Goals
Ada has three primary design goals. These goals are supported by a number of
languages features. Many of the features support more than one goal.
- Supporting reliability and maintainability
- Large programs with long lifetime
- Efficiency (minimize execution speed and space)
- Concern for programmer: Language is small and consistent
- Readability favored over writability
- Supporting reliability and maintainability
- Strong typing
- Abstraction: Packages with separate specification and
implementation
- Parameter modes
- Function parameter mode restrictions [relaxed in Ada12)
- Range constraints: errors detected as early as possible
- Subtypes and new types
- Pointer rules:
- Automatic initialization of pointers to null
- Pointer type can't outlive a pointer declaration
- Comments
- Not case sensitive
- Minimize single keystroke errors (examples ...)
- Ada 2012: pre/post conditions, type predicates and invariants
- Concern for programmer: Language is small and consistent
- Readable more important than writable
- Define before use
- Simple rules for operator precedence and associativity
- End if, end loop, end record, end name
- = and :=
- Operator overloading
- Keyword and default parameters
- And, and then, or, or else
- If, elsif, end if
- Array slices
- Case statement: when others required, break not required
- Unconstrained types
- Efficiency (minimize execution speed and space)
- Strong typing: allows compiler to do more optimization
- Value semantics: don't have to follow references if not needed
- OOP: polymorphism and class-wide types are not the default;
they must be explicitly chosen