[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamica

From: Ralf Hemmecke
Subject: Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... )
Date: Tue, 27 Sep 2005 16:30:26 +0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)


However, the desirable query

 if R has QuotientField S

thus defining S is, I think, quite difficult to implement
sensibly. Throughout
Axiom, this effect is obtained by adding another parameter to the
Package/Domain signature like:

MyPackage(F: Field, S: IntegralDomain): ...

 if F is Fraction S then

Martin, do you really mean "is" instead of "has"? I don't think that your "if" expression works with Aldor.

Anyway, if I were a compiler/interpreter, what would I do with something like

if F is Fraction S then ...

I would first evaluate the function "Fraction" obtaining a type T and then check whether F and T are the same thing. S would be lost. One could only achieve your wish by pattern matching, but Axiom doesn't work that way, does it?

> I think that works only in function definition but not in function
> decalaration.

Greg, what do you mean by that?


reply via email to

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