|
|
last edited 16 years ago by Bill Page |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
Editor: Bill Page
Time: 2008/07/08 21:54:04 GMT-7 |
||
Note: Some related referemces in the email list archives |
changed: -- http://sourceforge.net/mailarchive/forum.php?thread_name=486EA178.9010308%40hemmecke.de&forum_name=open-axiom-devel - -- http://sourceforge.net/mailarchive/forum.php?thread_name=87tzf5wag4.fsf%40gauss.cs.tamu.edu&forum_name=open-axiom-devel - -- http://sourceforge.net/mailarchive/forum.php?thread_name=87hcb5ikce.fsf%40gauss.cs.tamu.edu&forum_name=open-axiom-devel - -- http://aldor.org/pipermail/aldor-l_aldor.org/2008-July/001049.html - -- http://aldor.org/pipermail/aldor-l_aldor.org/2008-July/001051.html - -- http://aldor.org/pipermail/aldor-l_aldor.org/2008-July/001061.html - "open-axiom-devel":http://sourceforge.net/mailarchive/forum.php?thread_name=486EA178.9010308%40hemmecke.de&forum_name=open-axiom-devel - "open-axiom-devel":http://sourceforge.net/mailarchive/forum.php?thread_name=87tzf5wag4.fsf%40gauss.cs.tamu.edu&forum_name=open-axiom-devel - "open-axiom-devel":http://sourceforge.net/mailarchive/forum.php?thread_name=87hcb5ikce.fsf%40gauss.cs.tamu.edu&forum_name=open-axiom-devel - "aldor-l":http://aldor.org/pipermail/aldor-l_aldor.org/2008-July/001049.html - "aldor-l":http://aldor.org/pipermail/aldor-l_aldor.org/2008-July/001051.html - "aldor-l":http://aldor.org/pipermail/aldor-l_aldor.org/2008-July/001061.html
There seems to be different understandings of Type, domain, category, Category, etc. around. Here is an attempt to collect all these different opinions in order to make discussion about them clearer.
Some related referemces in the email list archives:
A category is an L-type whose type is the language-defined constant Category
.
A domain is an L-type whose type is a category.
An L-type is either a category, a domain or the language-defined constants Category
and Type
.
Any L-type is of type Type
.
I wrote L-type to mean type in the language, either Aldor or SPAD.
That conflicts the above statement that Type
is a domain, but is in line with the
two-level domain/category model.
See also Sections 7.8 (Domains) and 7.9 (Categories) of the Aldor User Guide.
I haven't (yet) found a sentence that says that Type
or Category
are domains.
Every value in Aldor is a member of a unique domain which determines the interpretation of its data.
All type values have ``Type'' as their unique base type. As with all other values, it is the unique base type which determines how values are to be represented.
The language allows categories to be treated as normal values and allows names to refer to categories. A category (by definition) is a value of the Aldor built-in type Category.
I have nothing againstType
being a type. But Type
is not an Aldor-domain.
Maybe it is a domain in a broader sense, but that sense is only vaguely defined, if at all.
I would like not to use domain and type interchangeably.
The fact that Type
is a domain certainly does not make domain
and type interchangeable. Objects of the domain Type
are
themselves either domains or categories, so type and domain
are still not interchangeable since categories are not domains.
Could you explain why you claim that "Type is not an Aldor-domain". Is this only a personal preference? To me: "If it talks like a duck and it looks like a duck, its a duck...". In this case the compiler output, the library definitions, and quotations from the primary developer all agree:
Type has with {};
returns true.
I simply have not found an explicit statement in the AUG that says thatType
and Category
are domains. How else could I claim that they are?
And regardless of what others say, could you give your definitions similar
to what I started at the beginning of this page? Let's first collect the status,
before we argue, what implications it would have if Type
would be a domain.
Maybe in the end it doesn't matter whether or not Category
and Type
are domains.
Personally I think Aldor is a brilliant distillation and crystallization of the concepts that evolved from SPAD in Axiom. It's novel "categorical" alternative to the class/subclass concepts of the object-oriented paradigm is probably still under-appreciated by language designers. The discipline of programming language design in the meantime has largely moved on to other issues but this tradition can be carried on in Axiom by the OpenAxiom? project.
This is a first draft in point form of how I think domains and categories should work in at least OpenAxiom?:
E.g.:
a:A := new()$A
declares a
as a variable with values in domain A returned by
an operation called new
in A.
E.g.:
d:Domain := A
declares d
as a variable whose value is the domain A. The
domain Domain provides some additional reflective and
syntactical operations on domains such as equality.
E.g.:
(d = A)@Boolean
is true only if d
has the value A.
E.g.:
X:Category == with f: A -> B
By "subdomain" is meant that the domains in Domain are also values in some category only if they reference that category by name and implement the required exported operations.
E.g.:
D:X == add f(x) == ...
As subdomains of Domain, categories are themselves domains and can be used in declarations of variables and parameters.
E.g.:
a:X := A #:X->Integer
Categories are organized into a lattice by referring to other categories by name.
E.g.:
Y:Category == X with g: B -> A
or:
Z:Category == Join(X,Y)
The list of exported operations is the union of all exported
operations of the categories to which it refers plus those
give after with
.
=
and has
.E.g.:
has:(Union(Category,Domain),Category) -> Boolean A has X
is true if A refers to X or to a category that refers to X applied recursively.