[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: |
Vanuxem Grégory |
Subject: |
RE: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ) |
Date: |
Tue, 27 Sep 2005 16:36:58 +0200 |
> -----Message d'origine-----
> De : Ralf Hemmecke [mailto:address@hidden
> Envoyé : mardi 27 septembre 2005 16:30
> À : Vanuxem Gregory
> Cc : Martin Rubey; axiom-dev
> Objet : Re: [Axiom-developer] RE: Types as values,and Re: Static
> versusDynamicallytyped(was:Philosophy... )
>
>
> [snip]
>
> >>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?
I think in axiom the keyword 'is' works only where we define function
(and not in function declaration) in other words:
MyPackage(F: Field, S: IntegralDomain): ...
myfunc(%):Type -> Type
add
if F is Fraction S then
myfunc...
else
myfunc...
Cheers,
Greg
>
> Ralf
>
- RE: [Axiom-developer] RE: Static versus Dynamically typed (was:Philosophy... ), (continued)
- RE: [Axiom-developer] RE: Static versus Dynamically typed (was:Philosophy... ), Bill Page, 2005/09/23
- Re: [Axiom-developer] RE: Types as values, and Re: Static versus Dynamically typed(was:Philosophy... ), William Sit, 2005/09/24
- Re: [Axiom-developer] RE: Types as values, and Re: Static versus Dynamically typed(was:Philosophy... ), Ralf Hemmecke, 2005/09/26
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamically typed(was:Philosophy... ), William Sit, 2005/09/26
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamically typed(was:Philosophy... ), Ralf Hemmecke, 2005/09/26
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ), William Sit, 2005/09/26
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ), Ralf Hemmecke, 2005/09/27
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ), Martin Rubey, 2005/09/27
- RE: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ), Vanuxem Gregory, 2005/09/27
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ), Ralf Hemmecke, 2005/09/27
- RE: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ),
Vanuxem Grégory <=
- Re: [Axiom-developer] RE: Types as values,and Re: Static versusDynamicallytyped(was:Philosophy... ), William Sit, 2005/09/28
- Re: [Axiom-developer] RE: Types as values,and Re: Static versusDynamicallytyped(was:Philosophy... ), Martin Rubey, 2005/09/28
- Re: [Axiom-developer] RE: Types as values, and Re: Static versusDynamicallytyped(was:Philosophy... ), Ralf Hemmecke, 2005/09/28
- [Axiom-developer] RE: Types as values, and Re: Static versus Dynamically typed, Bill Page, 2005/09/27
- [Axiom-developer] Re: Types as values, and Re: Static versus Dynamically typed, William Sit, 2005/09/27