axiom-developer
[Top][All Lists]
Advanced

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

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


From: Gabriel Dos Reis
Subject: Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)
Date: Mon, 13 Aug 2007 12:59:35 -0500 (CDT)

On Mon, 13 Aug 2007, Ralf Hemmecke wrote:

| > The Spad compiler tries to treat category constructors, domain
| > constructors, package constructors, and function calls as uniformly as
| > possible.  What I mean by that is that it applies the principle:
| > 
| >    When calling a function, collect candidates, filter them by
| >    applying the criteria that the arguments match the parameter types.
| >    And select the best match if possible.
| 
| Oh, I hope that will change. The compiler should *never* have a choice left.
| Either after filtering there remains *exactly* one possibility or the compiler
| should complain.

I believe that is what the Spad compiler does.  


| > And that irrespective of whether the arguments are value expressions
| > or domain expressions.
| 
| > By "matching" here, I don't necessarily mean only `pattern matching'.
| > Rather I mean `coercible'.  For example an expression of type Integer
| > is coercible to Float because Float exports the following function
| > 
| >      coerce : Integer -> % 
| 
| That is exactly what Aldor does *not* do. It never applies "coerce" if one
| doesn't explicitly call for it. At the moment I find Aldor much better in this
| respect. You should consider that some people might implement a function that
| is not a nice "coerce" (although their function carries this name).

I don't think there is anything we can do about that.  We can't police
people that name coerce a function that does pretend.  Sometimes that is
bad, sometimes that is good.

-- Gaby




reply via email to

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