axiom-developer
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]