From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA04459; Sat, 4 Sep 2004 10:40:34 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA05183 for ; Sat, 4 Sep 2004 10:40:33 +0200 (MET DST) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i848eVDn006032 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 4 Sep 2004 10:40:32 +0200 Received: from qrczak by qrnik.knm.org.pl with local (Exim 3.36 #1) id 1C3W5n-0001qr-00; Sat, 04 Sep 2004 10:40:15 +0200 To: skaller@users.sourceforge.net Cc: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] laziness References: <1094279400.3352.240.camel@pelican.wigram> From: "Marcin 'Qrczak' Kowalczyk" Date: Sat, 04 Sep 2004 10:40:15 +0200 In-Reply-To: <1094279400.3352.240.camel@pelican.wigram> (skaller@users.sourceforge.net's message of "04 Sep 2004 16:30:00 +1000") Message-ID: <87656u2zrk.fsf@qrnik.zagroda> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde with ID 41397F7F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 sourceforge:01 inlined:01 inlining:01 unspecified:01 inlining:01 marcin:01 kowalczyk:01 qrczak:01 semantics:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners