[MLton-user] Re: [polyml] Order of evaluation of arguments to a
function
Ramana Kumar
ramana.kumar at gmail.com
Thu Aug 18 08:08:25 PDT 2011
On Thu, Aug 18, 2011 at 4:00 PM, Alex Merry <alex.merry at cs.ox.ac.uk> wrote:
> 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)).
what about evaluating f?
>
> Alex
>
> --
> Alexander Merry
> DPhil Computer Science
> Department of Computer Science
> University of Oxford
>
> _______________________________________________
> polyml mailing list
> polyml at inf.ed.ac.uk
> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>
More information about the MLton-user
mailing list