Le Saturday 07 Jan 2012 à 02:07:24 (-0800), DelPhiNus a écrit :
> 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.
That's called type system with effects, or purity inference. There
aren't many languages with these features.
> 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.
To get this confirmed, compile your code with -dlambda and check out
what happens then. It does seem to be a bug.
--
Guillaume Yziquel
--
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