[MLton-user] Re: [polyml] Order of evaluation of arguments to a
alex.merry at cs.ox.ac.uk
Thu Aug 18 08:00:20 PDT 2011
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)).
DPhil Computer Science
Department of Computer Science
University of Oxford
More information about the MLton-user