This is just my personnal point of view but I prefer a compact
language with predictive evaluation order of expressions (shorter,
faster, better, stronger).

A predictive evaluation order from left to right is obviously more
intuitive than a language that doesn't give a warning in red letters
that the same very small and simple code can behave differently for
almost no reason.
I would be OK with you if Ocaml was able to detect and show during the
compilation the unpredictive tuple construction or multiple paramater
function call as soon as one of the sub-expression is likely to mutate
something used by the other sub-expression.

Anyway, don't forget that '(a, b) as c' seems to be broken in this
case. I personnaly think that Ocaml is not that strong and safe than I
thought before and we should be careful.

On 7 jan, 00:55, Ashish Agarwal <[email protected]> wrote:
> On Fri, Jan 6, 2012 at 6:18 PM, DelPhiNus <[email protected]> wrote:
> > In SML it would be: (inputLine stdIn, inputLine stdIn)
>
> > In Ocaml you have to explicitely write two successive assigments.
> > let line1 = read_line () in
> > let line2 = read_line () in
> > (line1, line2)
>
> > This is really suprising to have such limitation.
>
> Why do you call this a limitation? I don't think either choice is obviously
> better or worse. It could be argued that the SML choice of enforcing
> evaluation order in a tuple is non-intuitive and should not be relied upon,
> as where OCaml's choice forces you to see the order of evaluation more
> explicitly. I personally like OCaml's decision on this point.

-- 
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html

Reply via email to