Ada

From LQWiki
Jump to navigation Jump to search

Ada is a programming language similar to pascal named after Ada Byron, a famous British female mathematician related to the first computer. The Ada language focuses on type safety and compile-time checking, making it ideal for critical systems like avionics and medical equipment.

Ada is a very verbose language, where nearly all statements are spelled out in a combination of English keywords; this highlights the language's emphasis on code readability. Ada is also strongly object-oriented, and provides full capabilities for encapsulation, polymorphism, and generic programming, which makes it well-suited for programming "in the large". Furthermore, ordinary types can be "extended" to provide additional functionality or constraints: for example, the builtin Positive type is an extension of Integer that allows only non-negative numbers.

Another interesting feature about Ada are the available features for multi-threaded programming. While many languages that were popular when Ada first appeared (for example, C) relegated multi-threaded programming to operating system-dependent libraries, Ada actually includes such features (like Ada "tasking") as part of the official specification. In this way, the same multi-thread-capable software can be used on several machines without changing on the code is written; the compiler takes care of the system-dependent details.

The widely available GCC (Gnu Compiler Collection) has an Ada component called GNAT; but because some of GNAT is itself written in Ada, compiling it from source requires an existing binary version.

See also