Bill Page <bill.p...@newsynthesis.org> writes:

| On Mon, Oct 24, 2011 at 1:02 PM, Gabriel Dos Reis wrote:
| > ...
| > Waldek Hebisch writes:
| > | I would not call this voodoo: the compiler performs reasonable type
| > | inference.
| >
| > There is nothing reasonable about it.  The way that most AXIOM compilers
| > do overload resolution (even in faces of ambiguity) is to pick the first
| > from a list that makes the compilation works, regardless of whether the
| > arguments are the best or not.  That list does not necessarily follow
| > any principles that relates the arguments to the call, e.g. exact match
| > or requiring fewer implicit coercions, etc.  It is just how they happen
| > to be put on an internal list.
| >
| 
| As I recall that is not the case for function selection in the
| interpreter.  There is some heuristic which does attempt to assign a
| "weight" based on the number of coercions and other factors.

modemap selection in compiler is different from modemap selection in the
interpreter.  I am currently discussing the compiler.  You would be
surprised to see all those places where the compiler just randomly picks
the first modemap in a queue.

(the interpreter is a different matter. I can't say which one is worse :-)

| > | Sometimes compiler works too much to make sense of
| > | user input, but IMHO this is not the case.
| >
| > Unfortunately, this is one of those cases.  We are lucky that it works
| > at all; that is why it is voodoo.
| >
| 
| In your discussion you are talking about types of arguments but
| function selection in Axiom also uses the return type. So the compiler
| gives priority to any nullary function named Zero that returns the
| proper type. No?

No.

I think this part is getting off track. :-)

-- Gaby

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to