Browse thread
[Caml-list] Evaluation Order
-
David McClain
-
Brian Rogoff
- David McClain
- John Max Skaller
- John Max Skaller
-
Brian Rogoff
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | John Max Skaller <skaller@o...> |
| Subject: | Re: [Caml-list] Evaluation Order |
Brian Rogoff wrote: [Evaluation order] > The original arguments about optimizations > and parallelism don't seem to have borne fruit, so it would be good to fix > this. The question is whether we really want to encourage such an obvious flouting of referential transparency as being able to depend on the order of evaluation of the arguments of the infix integer addition operator. Perhaps binding record fields left to right makes sense, but making evaluation order explicit by let a = f() in let b = g() in a + b seems to be good style to me (you only need to know that Ocaml is an eager language). You could also run into problems if you used some syntactic sugar such as by using ocamlp4: the visible ordering mightn't be the final one unless the p4 macros took special care to ensure this. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr