axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex do


From: Christian Aistleitner
Subject: [Axiom-developer] Re: [Aldor-l] [Axiom-math] Are Fraction and Complex domains.
Date: Wed, 17 May 2006 09:51:49 +0200
User-agent: Opera Mail/9.00 (Linux)

Hello Martin,

On Tue, 16 May 2006 10:13:17 +0200, Martin Rubey <address@hidden> 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




reply via email to

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