On Mon, Oct 24, 2011 at 8:54 AM, Gabriel Dos Reis <g...@cs.tamu.edu> wrote: > ... > Now, consider the capsule-level variable "power". It is declared as > > power:PrimitiveArray(%) > > then later assigned to as > > power := new(0,0) > > There are two lexical occurences of the literal '0' in there. Can you > guess, which one is which? There are at least five interpretations for > each constant: > > 0: R -- the parameter R satisfies Ring > 0: Rep -- the parameter Rep satisfies UnivariatePolynomialCategory(R) > 0: % -- the current domains satisfies same > 0: NonNegativeInteger > 0: Integer > > > That this domain compiles at all is mysterious; it happens to depend on > a very obscure implementation detail of AXIOM compilers, one that is not > advertised at all -- and I don't think it should. > It is voodoo. So, I am calling it Johannes's Rep voodoo :-). >
I think that originally in Axiom the assignment above would be treated like this: power := new(Zero(),Zero()) So 0 would be resolved by the standard mechanism of function selection, right? I rather like this approach and sometimes wonder how it could be extended to all constants. If I understand correctly recently you have submitted some patches that begin to remove the special treatment of constants 0 and 1 as unary functions Zero and One. This seems to be going in the other direction. Comment? Regards, Bill Page. ------------------------------------------------------------------------------ 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