On 05/08/2007 09:25 AM, Gabriel Dos Reis wrote:
"Bill Page" <[EMAIL PROTECTED]> writes:
| > Many of the categories and friends dragged in by Integer do
| > not seem to be of necessity at the lowest level. So, you
| > could start with just the simple data structure Integer with
| > few operations and extend it as you go.
|
| But for this to be sucessful for the entire Axiom library
| wouldn't that require that there be no essential mutual
| recursion between source modules?
An example for Integer...
Suppose you have Integer just defined by
Integer: with == add;
Then you can say
define Ring: with {
...
*: (Integer, %) -> %;
}
extend Integer: Ring == add {...}
No mutual recursion is needed in this case. But I'm sure you knew that
already.
Spad needs to move to mutual recursion (with appropriate restrictions)
anyway.
Does someone know of an instance of mutual recursion in the Axiom
library that cannot be cured with "extend"? (I am not saying that I
don't want mutual recursion, but rather whether it is needed for the
current Axiom library.)
| I do not see how extend
| helps in this case. Sure it is possible even to have
| mutual recursion between extensions, not?
I don't know what a mutual recursion between extensions mean, but
definitely mutual recursion between domains is needed for natural
expressions of domains.
I also don't understand how mutual recursion and extend should work
together. Surely, it should be possible to extend any domain, no matter
how it is defined. Bill, can you give an example of what you mean?
Ralf
_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer