|
|
last edited 16 years ago by alfredo |
1 2 3 4 | ||
Editor: page
Time: 2008/06/28 14:40:13 GMT-7 |
||
Note: ideas about classes in Axiom |
changed: - MetaClass versus Category Axiom has a two-level type system consisting of categories and domains. In Axom domains are "classes":http://en.wikipedia.org/wiki/Class_(computer_science) in the sense of "object-oriented programming":http://en.wikipedia.org/wiki/Object-oriented_programming The instances of domains are called objects. For example -1 is an object of the domain Integer. Each domain belongs to one or more categories. Categories specify the external interface, i.e. what methods a domain exports plus optional default implementations of some of these methods. For example the domain Integer belongs to the category IntegerNumberSystem. All types (domains and categories) in Axiom are "first-order", i.e. they have some representation at run-time. They can be stored as values of variables and they can be passed and returned as values of functions. In other words Axiom domains are themselves objects. So an Axiom category is actually a "meta-class":http://en.wikipedia.org/wiki/Metaclass
MetaClass? versus Category
Axiom has a two-level type system consisting of categories and domains.
In Axom domains are classes in the sense of object-oriented programming
The instances of domains are called objects. For example -1 is an object of the domain Integer.
Each domain belongs to one or more categories. Categories specify the external interface, i.e. what methods a domain exports plus optional default implementations of some of these methods. For example the domain Integer belongs to the category IntegerNumberSystem?.
All types (domains and categories) in Axiom are "first-order", i.e. they have some representation at run-time. They can be stored as values of variables and they can be passed and returned as values of functions. In other words Axiom domains are themselves objects.
So an Axiom category is actually a meta-class