"Christian Aistleitner" <[EMAIL PROTECTED]> writes: > Hello Martin, > > On Tue, 16 May 2006 10:13:17 +0200, Martin Rubey > <[EMAIL PROTECTED]> 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 should have been more precise: with "equal in some sense" I meant "not exactly equal". In german it is easier: I meant "nicht dasselbe sondern nur das gleiche". > I guess nowhere. But typically, you'd expect it. if x and y are "dasselbe" yes, otherwise no. > > Consider > a: List Integer := [ 1 ]; > b: List Integer := [ 2 ]; > you want to be able to call append!( a, b ), won't you? yes, since (eq Integer Integer) > 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. OK, I see now. It could be -- in the non functional setting -- that a: NonFunctionalDomainConstructor Integer := something b: NonFunctionalDomainConstructor Integer := otherthing and NonFunctionalDomainConstructor exports an operation f(%, %), but I still *shouldn't* be able to call f(a, b), since a and b come from different instantiations of NonFunctionalDomainConstructor Integer? (Not currently, since it seems that Aldor instantiates a Domain only another time, if the argument has changed.) > > 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. which one? By the way: please include output of your aldor programs. It's always a hassle for me to reproduce it. > > I'd leave it unspecified. > > Leaving compiler behaviour unspecified is a bad thing. No, not necessarily. Maybe I should have said "undefined". In Lisp this is the case for many things. It's basically saying: "in principle it is an error, but don't expect that I throw an error message". > No user would be allowed to rely on calling List( Integer ) two times would > give an identical result. I agree that I wouldn't leave *this* unspecified, but I could imagine saying: * domains are "compatible" (i.e., you may use append in the example you gave above), if their arguments were identical. In this case, the domain is instantiated only once. * if their arguments were not identical, the behaviour is unspecified thanks for getting me into the boat again, Martin _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer