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
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
open-axiom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel