[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebrafai

From: William Sit
Subject: Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebrafailure)
Date: Tue, 14 Aug 2007 15:39:32 -0400

Martin Rubey wrote:

> My personal preference is:
> * no automatic coercion in the compiler

In principle, I agree with this. The source of library code should be 
(in addition to well-documented).  In practice, it would be nice if there is 
help, such as spitting out possible coercion paths when explicit coercions 
being no other type under this policy) are not specified or ambiguous due to
identical signatures (hence, a similar help should be given for package calls). 
Spad experience has been that, conservatively estimating, over 70% of coding 
is on coercions and perhaps 10% of time to find and specify the package calls. 
any type of assistance, whether you call it automatic or not, will be much

> * automatic coercion (as intelligent as possible, possibly even several steps,
>   i.e., assuming that all coercion paths yield the same result, although this
>   will sometimes not be true in reality) in the interpreter

I don't believe there should be two different strategies (or standards if you
will), one for compiler and one for interpreter. If people find automatic 
in the interpreter convenient and useful say 90% of the time, that saves time in
developing code. (There are plenty of empirical evidence: the popularity of 
and Mathematica in casual as well as serious computations.) Having a different
strategy is the cause of all the "pain" when a fully tested interpreter code is
turned into Spad because it would not be accepted by the compiler (that is where
the over 70% of time of code development is spent). I would prefer the compiler
also "preprocesses" source code, perhaps reporting (much like ")set mess bot 
on" in
the Axiom interpreter) its choices and ideally, in a supporting editor, allows 
programmer to decide to accept or not. The Axiom language should be one, not 
We learn through repetitions. This will significantly lower the slopes of the
learning curve.

For diehard users, there is no prohibition for them to explicitly call 
coercions or

The problem of different paths of coercions between two given domains has to be
dealt with separately, from a general policy to enforce commutativity of 
(in the sense of Category Theory). It is not just a problem on coercion maps. A
database of commutative diagrams need to be maintained. It is a very important 
of constructive algebra (which is partly based on algorithms for universal

> When writing library code, the extra pain to write down the coercion is really
> worth the effort.  The combinat experience was much more pleasant than the
> Guess experience, in this particular point.

No, "pain" should not be the norm (and definitely, not "extra pain"), but rather
the metric. Intuitively, positive experience can only be assured when there is 

> Using the Aldor interpreter however is a pain for me.

For me, translating Spad code accepted by the Axiom interpreter into Spad code
accepted by the compiler is a pain. Either require explicit coercions and calls 
both the compiler and interpreter, or provide the SAME verifiable/selectable
assistance in both cases.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]