[Aldor-l] [Axiom-math] Are Fraction and Complex domains.
Christian Aistleitner
tmgisi at gmx.at
Wed May 17 03:51:49 EDT 2006
Hello Martin,
On Tue, 16 May 2006 10:13:17 +0200, Martin Rubey
<martin.rubey at univie.ac.at> wrote:
> Where does it say that Dom(x) and Dom(y) should be the same, even if x
> and y
> are equal in some sense?
I guess nowhere. But typically, you'd expect it.
Consider
a: List Integer := [ 1 ];
b: List Integer := [ 2 ];
you want to be able to call append!( a, b ), won't you?
But actually, you invoke the function List two times. Each time with the
same argument (namely Integer).
If calling a function two times with the same argument yields the same
(not the equivalent, but really the same) result, we call it "functional"
in the discussion. Otherwise, we call it non functional. Just as with
(functional) relations.
> I would imagine that Dom(x) and Dom(y) are the same, (i.e., instantiated
> only
> once) if x and y are the same, i.e., if (eq x y) as opposed to (equal x
> y), but
> I'd be interested to find something about this in the documentation.
That's the main point ... what kind of "equals" does Aldor apply?
I do not know. Just look at the Dom example I gave.
> I'd leave it unspecified.
Leaving compiler behaviour unspecified is a bad thing. No user would be
allewed to rely on calling List( Integer ) two times would give an
identical result.
Why would no user be able to rely on it, if its unspecified?
Because it might change in future :(
--
Kind regards,
Christian
More information about the Aldor-l
mailing list