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] laziness
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] laziness
On Sat, 2004-09-04 at 18:40, Marcin 'Qrczak' Kowalczyk wrote:
> skaller <> writes:
> > However if the call is *inlined* to get
> >
> > 	if c' then a' else b'
> >
> > then perhaps a' or b' will never be evaluated.
> No. Inlining is considered an optimization, which implies that it
> doesn't change the semantics except when it was not fully specified
> in the first place.

I understand that argument -- but that doesn't mean the
compiler conforms to the specification, nor that the
specification is best.

> E.g. the order of evaluation of arguments is
> unspecified, so it might be different depending on inlining; but
> OCaml does specify that each argument are evaluated exactly once
> and inlining doesn't change that.

Must they be evaluated before the function is called?

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: