Ralf Hemmecke <[email protected]> writes:

[...]

| In fact, shouldn't it be possible in panAxiom to have
| 
|   spnt: (DF, DF) -> %
| 
| and
| 
|   spnt: (DF, DF) -> Rep
| 
| ?

As you may know, that is already possible in all AXIOM variants.
The real question is: is it easy to use them without getting into
infinite loop?  

The answer is definitely yes in OpenAxiom.  You just have to use the
`constant definition' style (which is also used by Aldor), e.g.

      Rep == PrimitiveArray DF

instead of the old `assignment' style

      Rep := PrimitiveArray DF
 
If you use the constant definition style, the OpenAxiom compiler will
refrain from generating implicit conversions between Rep and %.
However, it will generate the morphisms

       rep: % -> Rep
       per: Rep -> %

free of charge.  They have no runtime cost.
That is the style that I use and recommend.  However, since other
AXIOM variants have not yet implemented that semantics, someone who is
writing a library for all AXIOM variants will have to go with the least
available. 

| I am very much in favour of writing the types explicitly. It's easier
| for people who check the code.

Too much redundancy can also hinder comprehension, as the real
information will be lost in the type noise.  There is a balance
to strike.  There is evidence that reasonable people differ where the
balance should be. 

-- Gaby

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to