On 18/08/11 15:06, Ivan Tomac wrote:
It seems to me like SML/NJ, MLton and PolyML evaluate all function arguments left to right, OCaml evaluates them right to left, and Moscow ML seems inconsistent.
I'd say that it seems like, given an expression (f x y), SML/NJ, MLton and PolyML evalute x, then (f x), then ((f x) y), while Moscow ML evaluates x, then y, then (f x y) (essentially uncurrying the function first). If OCaml prints 2 then 1 in the second example you gave, that seems like strange behaviour (evaluating y then x then (f x y)).
Alex