Aldor is a programming language.[1][2][3] It is the successor of A# as the extension language of the Axiom computer algebra system.

Aldor
ParadigmMulti-paradigm: object-oriented, functional, imperative, dependent typed, logic
Designed byRichard Dimick Jenks, Barry Trager, Stephen Watt, James Davenport, Robert Sutor, Scott Morrison
DeveloperThomas J. Watson Research Center
First appeared1990; 34 years ago (1990)
Stable release
1.0.3
Preview release
1.1.0
PlatformAxiom computer algebra system
OSLinux, Solaris, Windows
LicenseAldor Public 2.0, Apache 2.0
Filename extensions.al, .as
Websitealdor.org
Major implementations
Axiom computer algebra system
Influenced by
A#, Pascal, Haskell

Aldor combines imperative, functional, and object-oriented features. It has an elaborate type system,[4] allowing types to be used as first-class values. Aldor's syntax is heavily influenced by Pascal, but it is optionally indentation-sensitive, using whitespace characters and the off-side rule, like Python. In its current implementation, it is compiled, but an interactive listener is provided.

Aldor is distributed as free and open-source software, under the Apache License 2.0.

Examples

The Hello world program looks like this:

#include "aldor"#include "aldorio"stdout << "Hello, world!" << newline;

Example of dependent types (from the User Guide):

#include "aldor"#include "aldorio"#pilesumlist(R: ArithmeticType, l: List R): R ==     s: R := 0;    for x in l repeat s := s + x    simport from List Integer, Integer, List SingleFloat, SingleFloatstdout << sumlist(Integer, [2,3,4,5]) << newlinestdout << sumlist(SingleFloat, [2.0, 2.1, 2.2, 2.4]) << newline

99 Bottles of Beer:

#include "aldor"#include "aldorio"import from Integer, String;bob(n: Integer): String == {    b: String := " bottle";    if n ~= 1 then b := b + "s";    b + " of beer";}main(): () == {    n: Integer := 99;    otw: String := " on the wall";    -- refrain    while n > 0 repeat {        stdout << n << bob(n) << otw << ", " << n << bob(n) << "." << newline;        stdout << "Take one down and pass it around, ";        n := n - 1;        if n > 0 then stdout << n;        else stdout << "no more";        stdout << bob(n) << otw << "." << newline;        stdout << newline;    }    -- last verse    stdout << "No more" << bob(n) << otw << ", no more" << bob(n) << "." << newline;    stdout << "Go to the store and buy some more, ";    n: Integer := 99;    stdout << n << bob(n) << otw << "." << newline;}main();

References


🔥 Top keywords: Main PageSpecial:SearchPage 3Wikipedia:Featured picturesHouse of the DragonUEFA Euro 2024Bryson DeChambeauJuneteenthInside Out 2Eid al-AdhaCleopatraDeaths in 2024Merrily We Roll Along (musical)Jonathan GroffJude Bellingham.xxx77th Tony AwardsBridgertonGary PlauchéKylian MbappéDaniel RadcliffeUEFA European Championship2024 ICC Men's T20 World CupUnit 731The Boys (TV series)Rory McIlroyN'Golo KantéUEFA Euro 2020YouTubeRomelu LukakuOpinion polling for the 2024 United Kingdom general electionThe Boys season 4Romania national football teamNicola CoughlanStereophonic (play)Gene WilderErin DarkeAntoine GriezmannProject 2025