axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] [#263 ContinuedFraction returns incorrect types] stati


From: Bill Page
Subject: [Axiom-developer] [#263 ContinuedFraction returns incorrect types] static types
Date: Mon, 06 Feb 2006 10:38:15 -0600

Changes 
http://wiki.axiom-developer.org/263ContinuedFractionReturnsIncorrectTypes/diff
--
Ralf, do you think you could provide some example code that
does this and actually works? I remain a little sceptical.

I think Axiom's two-level type system is going to get in
the way. Although it is true that types in Axiom are "first
order objects" in the sense that we can assign them to variables
etc., the kind of things that we can actually do with them is
very limited. For example, I see no way in Axiom, SPAD or Aldor
to have::

  FRAC FRAC INT = FRAC INT

since 'FRAC INT' is  static type and 'FRAC FRAC INT' is another
static type. In Axiom there is no way to write a function which
returns different types depending on it's parameters::

  fType(x) ==
     x=0 ==> Integer
     Float

  t:fType(1):=1.0

because types like 'Integer' and 'Float' are not members of some
domain in the same since in which '1' and '-1' are members of
'Integer'. And further there is no equality defined over types.

Or do I not understand something quite fundamental here?

Perhaps what you are suggesting amounts to ensuring that, as
types these two are at least functionally equivalent?

--
forwarded from http://wiki.axiom-developer.org/address@hidden




reply via email to

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