Aldor


Aldor is a programming language. It is the successor of A# as the extension language of the Axiom computer algebra system.
Aldor combines imperative, functional, and object-oriented features. It has an elaborate type system, 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:

  1. include "aldor"
  2. include "aldorio"
stdout << "Hello, world!" << newline;

Example of dependent types :

  1. include "aldor"
  2. include "aldorio"
  3. pile
sumlist: R
s: R := 0;
for x in l repeat s := s + x
s
import from List Integer, Integer, List SingleFloat, SingleFloat
stdout << sumlist << newline
stdout << sumlist << newline

;99 Bottles of Beer

  1. include "aldor"
  2. include "aldorio"
import from Integer, String;
bob: String
main:
main;