[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [Aldor-l] RE: Axiom domains and Aldor return types
From: |
Ralf Hemmecke |
Subject: |
[Axiom-developer] Re: [Aldor-l] RE: Axiom domains and Aldor return types |
Date: |
Wed, 12 Jan 2005 17:03:27 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041202) |
Hi Bill,
Foo: with { g: (n: PositiveInteger, k: PositiveInteger) ->
PrimeField(n) } == add {
g(n: PositiveInteger, k: PositiveInteger ): PrimeField(n) ==
k::Integer::PrimeField(n) }
Ok, I will work with this example. Yes, it is better.
Well, I haven't checked whether it should really work, but
shouldn't be
Foo: with {
g: (n: PositiveInteger, k: PositiveInteger) ->
(P: PrimeFieldCategory, x: P)
} == add {
g(n: PositiveInteger, k: PositiveInteger ):
(P: PrimeFieldCategory, x:P) == {
(PrimeField(n), k::Integer::PrimeField(n)
}
}
be even better? The above code will not compile in Aldor, since it does
not have PositiveInteger. And maybe it will even not compile with
appropriate substitutions since the compiler cannot handle such a
construction. I am, however, very much against the Any type. It is like
building a strongly typed language and than trying to forget about
types. For the interpreter it maybe OK, but not for the compiler.
Programming in Axiom should mean writing programs for the compiler. I
would say that programming in the interpreter is just writing short
scripts but not real programs.
See also
http://www.aldor.org/docs/HTML/chap23.html#10
Ralf
- [Axiom-developer] RE: Axiom domains and Aldor return types, Page, Bill, 2005/01/12
- [Axiom-developer] Re: [Aldor-l] RE: Axiom domains and Aldor return types,
Ralf Hemmecke <=
- Re: [Axiom-developer] Re: [Aldor-l] RE: Axiom domains and Aldor returntypes, William Sit, 2005/01/12
- Re: [Axiom-developer] Re: [Aldor-l] RE: Axiom domains and Aldorreturntypes, William Sit, 2005/01/13
- Re: [Axiom-developer] Re: [Aldor-l] RE: Axiom domains andAldorreturntypes, William Sit, 2005/01/13
- Re: [Axiom-developer] Re: [Aldor-l] RE: Axiom domains and Aldorreturntypes, Martin Rubey, 2005/01/13
- RE: [Axiom-developer] Axiom domains and Aldor return types, Bill Page, 2005/01/13
- RE: [Axiom-developer] Axiom domains and Aldor return types, Martin Rubey, 2005/01/14
- Re: [Aldor-l] RE: [Axiom-developer] Axiom domains and Aldor return types, Gabriel Dos Reis, 2005/01/14
- Re: [Axiom-developer] Axiom domains and Aldor return types, Stephen Wilson, 2005/01/14
- Re: [Axiom-developer] Axiom domains and Aldor return types, William Sit, 2005/01/14
- Re: [Axiom-developer] Axiom domains and Aldor return types, Stephen Wilson, 2005/01/14