Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Evaluation Order
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-11 (11:20)
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,
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper
download Interscript
Bug reports:  FAQ:
To unsubscribe, mail  Archives: