next up previous
Next: The ALLCOT syntax Up: The ALLCOT language Previous: An ALLCOT program

The ALLCOT language: a first overview

Strictly speaking, the ALDOR language is not an object oriented language. Indeed, its notion of a domain is richer than a class (like a JAVA class). However, the ALLCOT language, because of its restrictions w.r.t. ALDOR, will essentially be a simple object oriented language.

In the above example OddNumbers and Word are classes in the sense that

In the above example, Monoid, WordMonoid and MonoidOfZ are interfaces in the sense that each of them is a list of function declarations. Note that both WordMonoid and MonoidOfZ inherit from Monoid. Observe also that

Observe also the role of the symbol %.

Finally, observe the different kinds of equality-like symbols.

==
is used for a category definition, a domain definition or a function definition. In fact, in aldor it is used for a constant definition, that is for the definition of some variable whose value cannot change.
:=
is used for a variable definition (whose value can change).
=
is used for the equality test.


next up previous
Next: The ALLCOT syntax Up: The ALLCOT language Previous: An ALLCOT program
Marc Moreno Maza
2004-12-01