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