Content deleted Content added
Alexflatter (talk | contribs) No edit summary |
Jerryobject (talk | contribs) WP:LINKs: update-standardizes, adds, needless WP:PIPEs > WP:NOPIPEs. Small WP:COPYEDITs WP:EoS: clarify, WP:TERSE. WP:REFerence WP:CITation parameters: update-standardize-conform, respace, reorder. Nonacronym nonproper + proper noun MOS:ALLCAPS > Title case. Adds: MOS:COMMENT, WP:CATEGORY. |
||
Line 22:
| latest preview version =
| latest preview date =
| influenced by = [[ALGOL 68]], [[Pascal (programming language)|Pascal]], [[Simula
| operating system = Multi- or [[cross-platform]]
| file ext = .adb, .ads
Line 29:
}}
'''Ada''' is a [[structured programming|structured]], [[statically typed]], [[Imperative programming|imperative]], and [[Object-oriented programming|object-oriented]] [[high-level programming language]], inspired by [[Pascal (programming language)|Pascal]] and other languages. It has built-in language support for ''[[design by contract]]'' (DbC), extremely [[Strong and weak typing|strong typing]], explicit concurrency, tasks, synchronous [[message passing]], protected [[Object (computer science)|objects]], and [[nondeterministic programming|non-determinism]]. Ada improves code safety and maintainability by using the [[compiler]] to find errors in favor of [[Runtime (program lifecycle phase)|runtime]] errors. Ada is an [[International standard|international]] [[technical standard]], jointly defined by the [[International Organization for Standardization]] (ISO), and the [[International Electrotechnical Commission]] (IEC). {{As of|May 2023}}, the standard,
Ada was originally designed by a team led by French [[computer scientist]] [[Jean Ichbiah]] of [[Groupe Bull|Honeywell]] under contract to the [[United States Department of Defense]] (DoD) from 1977 to 1983 to supersede over 450 programming languages then used by the DoD
== Features ==
Ada was originally designed for [[embedded system|embedded]] and [[real-time computing|real-time]] systems. The Ada 95 revision, designed by S. Tucker Taft of [[Intermetrics]] between 1992 and 1995, improved support for systems, numerical, financial, and [[object-oriented programming]] (OOP).
Features of Ada include: [[Strong and weak typing|strong typing]], [[modular programming]] mechanisms ([[Modular programming|packages]]), [[run-time checking]], [[Parallel computing|parallel processing]] ([[Task (computing)|tasks]], synchronous [[message passing]], protected objects, and nondeterministic [[Switch statement|select statements]]), [[exception handling]], and [[generic programming|generics]]. Ada 95 added support for [[object-oriented programming]], including [[dynamic dispatch]].
The [[Syntax (programming languages)|syntax]] of Ada minimizes choices of ways to perform basic operations, and prefers English keywords (such as "or else" and "and then") to symbols (such as "||" and "&&"). Ada uses the basic arithmetical operators "+", "-", "*", and "/", but avoids using other symbols. Code blocks are delimited by words such as "declare", "begin", and "end", where the "end" (in most cases) is followed by the identifier of the block it closes (e.g., ''if ... end if'', ''loop ... end loop''). In the case of conditional blocks this avoids a ''[[dangling else]]'' that could pair with the wrong nested if-expression in other languages like C or Java.
Line 42:
Ada is designed for developing very large software systems. Ada packages can be compiled separately. Ada package specifications (the package interface) can also be compiled separately without the implementation to check for consistency. This makes it possible to detect problems early during the design phase, before implementation starts.
A large number of [[Compile time|compile-time]] checks are supported to help avoid bugs that would not be detectable until run-time in some other languages or would require explicit checks to be added to the source code. For example, the syntax requires explicitly named closing of blocks to prevent errors due to mismatched end tokens. The adherence to strong typing allows detecting many common software errors (wrong parameters, range violations, invalid references, mismatched types, etc.) either during compile-time, or otherwise during run-time. As concurrency is part of the language specification, the [[compiler]] can in some cases detect potential [[Deadlock (computer science)|deadlocks.]]<ref>{{cite web|url=https://www.adaic.org/resources/add_content/docs/95style/html/sec_6/|
Ada also supports [[Runtime system|run-time]] checks to protect against access to unallocated memory, [[buffer overflow]] errors, range violations, [[off-by-one error]]s, array access errors, and other detectable bugs. These checks can be disabled in the interest of runtime efficiency, but can often be compiled efficiently. It also includes facilities to help [[software verification|program verification]]. For these reasons, Ada is sometimes used in critical systems, where any [[anomaly in software|anomaly]] might lead to very serious consequences, e.g., accidental death, injury or severe financial loss. Examples of systems where Ada is used include [[avionics]], [[air traffic control]], [[Rail transport|railways]], banking, military and [[space technology]].<ref>{{cite web|title=Ada helps churn out less-buggy code|url=http://gcn.com/Articles/1999/06/30/Ada-helps-churn-out-lessbuggy-code.aspx|publisher=Government Computer News|access-date=2010-09-14|last1=Taft|first1=S. Tucker|last2=Olsen|first2=Florence|pages=2–3|date=1999-06-30|archive-date=2015-08-31|archive-url=https://web.archive.org/web/20150831211902/http://gcn.com/Articles/1999/06/30/Ada-helps-churn-out-lessbuggy-code.aspx|url-status=dead}}</ref><ref name="Ada_usage">{{cite web |last=Feldman |first=Michael |title=Who's Using Ada? Real-World Projects Powered by the Ada Programming Language November 2014 |url=https://www2.seas.gwu.edu/~mfeldman/ada-project-summary.html#Banking_and_Financial_Systems |publisher=SIGAda Education Working Group}}</ref>
Line 65:
HOLWG crafted the '''<span class="anchor" id="Steelman language requirements">Steelman language requirements</span>''' , a series of documents stating the requirements they felt a programming language should satisfy. Many existing languages were formally reviewed, but the team concluded in 1977 that no existing language met the specifications. The requirements were created by the [[United States Department of Defense]] in ''The Department of Defense Common High Order Language program'' in 1978. The predecessors of this document were called, in order, "Strawman", "Woodenman", "Tinman" and "Ironman".<ref>Department of Defense (June 1978), [https://web.archive.org/web/20200914235620/https://dwheeler.com/steelman/steelman.htm Requirements for High Order Computer Programming Languages: "Steelman"]</ref> The requirements focused on the needs of [[embedded systems|embedded]] computer applications, and emphasised reliability, maintainability, and efficiency. Notably, they included [[exception handling]] facilities, [[run-time checking]], and [[parallel computing]].
It was concluded that no existing language met these criteria to a sufficient extent,<ref>SoftTech Inc. (1976), [[iarchive:DTIC_ADA037637/mode/2up|"Evaluation of ALGOL 68, Jovial J3B, Pascal,
[[File:Ada Lovelace portrait.jpg|thumb|225x225px|Watercolour painting of Ada Lovelace]]
Line 137:
=== "Hello, world!" in Ada ===
A common example of a language's [[Syntax (programming languages)|syntax]] is the [["Hello,
(hello.adb)
<syntaxhighlight lang="ada" line>
Line 388:
* [http://purl.umn.edu/41474 Ada Programming Language Materials, 1981–1990]. [[Charles Babbage Institute]], University of Minnesota.
* Department of Defense (June 1978), [https://web.archive.org/web/20200914235620/https://dwheeler.com/steelman/steelman.htm Requirements for High Order Computer Programming Languages: "Steelman"]
* David A. Wheeler (1996), [https://web.archive.org/web/20200915104558/https://dwheeler.com/steelman/ Introduction to Steelman On-Line] (
* SoftTech Inc. (1976), [https://archive.org/details/DTIC_ADA037637/mode/2up "Evaluation of ALGOL 68,
* David A. Wheeler (1997), [https://web.archive.org/web/20200914235617/https://dwheeler.com/steelman/steeltab.htm "Ada, C, C++, and Java vs. The Steelman"]. Originally published in ''Ada Letters'' July/August 1997.
Line 411:
[[Category:High-level programming languages]]
[[Category:Ada Lovelace]]
<!-- Hidden categories below -->
[[Category:Articles with example Ada code]]
|