[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [#261 Strange matrix addition] Bug or Feature
From: |
Ralf Hemmecke |
Subject: |
[Axiom-developer] [#261 Strange matrix addition] Bug or Feature |
Date: |
Thu, 02 Feb 2006 04:00:30 -0600 |
Changes http://wiki.axiom-developer.org/261StrangeMatrixAddition/diff
--
I don't know whether I should consider that
behaviour of Axiom as a bug or a feature.
If one puts
<pre>
macro S d == SquareMatrix(d,Integer)
abc(): OutputForm ==
a2: S(2) := 1
a3: S(3) := 1
(a2 + a3)::OutputForm
</pre>
into a file aaa.input and then says
<pre>
)read aaa
abc()
</pre>
one gets exactly the same result of type
SquareMatrix(2,SquareMatrix(3,Integer)) as above.
Clearly, the same code, when put into aaa.spad does not even compile via
<pre>
)co aaa
</pre>
The danger is the following (which is maybe not clearly demonstrated by the
code above):
If somebody writes some prototype of a function into an .input file and later
wants to transform the code into a .spad form, s/he cannot expect that the
result is the same. If the code does compile the semantics is still different
since for the .input part the interpreter might add some knowledge.
That problem is certainly known to people who have used Axiom extensively, but
it will come as a surprise if one is relatively new to Axiom.
--
forwarded from http://wiki.axiom-developer.org/address@hidden
- [Axiom-developer] [#261 Strange matrix addition] Bug or Feature,
Ralf Hemmecke <=