HOME

TheInfoList



OR:

Aldor is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming l ...
. It is the successor of A# as the extension language of the Axiom computer algebra system. Aldor combines imperative, functional, and
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
features. It has an elaborate type system, allowing types to be used as first-class values. Aldor's syntax is heavily influenced by
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
, but it is optionally indentation-sensitive, using
whitespace character In computer programming, whitespace is any character or series of characters that represent horizontal or vertical space in typography. When rendered, a whitespace character does not correspond to a visible mark, but typically does occupy an area ...
s and the
off-side rule A computer programming language is said to adhere to the off-side rule of syntax if blocks in that language are expressed by their indentation. The term was coined by Peter Landin, possibly as a pun on the offside rule in association footba ...
, like Python. In its current implementation, it is compiled, but an interactive listener is provided. Aldor is distributed as
free and open-source software Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
, under the Apache License 2.0.


Examples

The
Hello world program ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the '' Norwich ...
looks like this: #include "aldor" #include "aldorio" stdout << "Hello, world!" << newline; Example of dependent types (from the User Guide): #include "aldor" #include "aldorio" #pile sumlist(R: ArithmeticType, l: List R): R

s: R := 0; for x in l repeat s := s + x s import from List Integer, Integer, List SingleFloat, SingleFloat stdout << sumlist(Integer, ,3,4,5 << newline stdout << sumlist(SingleFloat, .0, 2.1, 2.2, 2.4 << newline
99 Bottles of Beer "99 Bottles of Beer" or "100 Bottles of Pop on the Wall" is a song dating to the mid-20th century. It is a traditional reverse counting song in both the United States and Canada. It is popular to sing on road trips, as it has a very repetitive ...
: #include "aldor" #include "aldorio" import from Integer, String; bob(n: Integer): String

main(): ()

main();


References


External links

*
Open Source Development - Git repository

Aldor User Guide
Experimental programming languages Object-oriented programming languages {{compu-lang-stub