On Wed, Apr 23, 2008 at 4:33 PM, Martin Rubey wrote: > > Bill Pagewrites: > > > > Why on earth is it interpreting [a,b] as List OrderedVariableList [a,b]? > > > That doesn't make sense! > > > > > > > Why not? Again what would you expect? > > > > (4) -> [a,b] > > > > (4) [a,b] > > Type: List OrderedVariableList [a,b] > > > > Off hand this seems like a reasonably conservative choice to me. :-) > > Oh dear, you got me there! Well, OK. >
Seriously. I think the interpreter usually tries starts by making the most conservative choice of type possible, i.e. it uses the "smallest" type that includes the object of interest. That is why for example: (9) -> 1 (9) 1 Type: PositiveInteger (10) -> 0 (10) 0 Type: NonNegativeInteger (11) -> -1 (11) - 1 Type: Integer (12) -> Then it tries to use the minimum number of coercions necessary to expand the possibilities until a mode match is found. At least that is how I have come to intuitively understand the algorithm. Regards, Bill Page. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel