[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-math] Are Fraction and Complex domains.
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-math] Are Fraction and Complex domains. |
Date: |
Thu, 11 May 2006 19:36:05 +0200 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060420) |
On 05/11/2006 06:47 PM, Gabriel Dos Reis wrote:
Francois Maltey <address@hidden> writes:
| Hello,
|
| What is the finest term ?
|
| Integer is a domain,
|
| Can I say : " Complex Integer is a domain " ?
I think so.
So do I.
| or " Complex " is a domain with a parameter as Integer ?
"Complex" is the name of a (type) function. "Complex ?" is a mode.
(Integer is a mode too, but that is less interesting.)
I would call "Complex" a domain constructor.
Can you teach me what a "mode" is? Is that some common term used in some
context?
| or " Complex " construct a domain, but isn't a domain ?
I think so.
Hmmm, according to Section 7.8 in the pdf-version of the AldorUserGuide,
one must perhaps also call "Complex" a domain. But then I would prefer
to call it "parametrized domain".
| or " Integer " is an abbreviation for Integer without parameter ?
from the functional perspective, Integer is a nullary (type) function;
it is actually a type constant.
From a functional point of view you are certainly right, the only
problem is that Aldor is not functional. (I have no idea whether the
following could be done in SPAD, though.)
BTW, I would rather say, Integer is a type constant. If Integer() is
defined and works in Axiom then please show me a definition of the
language that makes it clear that if one defines
Integer: SomeIntegerCategory
that also
Integer: () -> SomeIntegerCategory
To me, these two things clearly have a different type.
Ralf
----------------------------------------------------------
aldor -grun -laldor aaa.as
Dom: 1
Dom(): 0
--begin aaa.as --------------------------------------------
#include "aldor"
#include "aldorio"
Cat: Category == Join(ArithmeticType, OutputType) with;
Dom: Cat == Integer add;
Dom(): Cat == Integer add {
Rep == Integer;
import from Rep;
1: % == per 0;
}
main(): () == {
import from Dom, Dom();
stdout << "Dom: " << 1$Dom << newline;
stdout << "Dom(): " << 1$Dom() << newline;
}
main();
--end aaa.as