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: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] laziness
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. 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.

   __("<         Marcin Kowalczyk

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