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 PAA01039; Tue, 12 Jun 2001 15:15:21 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA01251 for ; Tue, 12 Jun 2001 15:15:20 +0200 (MET DST) Received: from emc.com (emcmail.lss.emc.com [168.159.48.78]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f5CDFJb12527 for ; Tue, 12 Jun 2001 15:15:19 +0200 (MET DST) Received: from lub0127.lss.emc.com (lub0127.lss.emc.com [168.159.38.127]) by emc.com (8.10.1/8.10.1) with ESMTP id f5CDFIm11088 for ; Tue, 12 Jun 2001 09:15:18 -0400 (EDT) Received: (from gbruncot@localhost) by lub0127.lss.emc.com (8.9.3/8.9.3) id JAA15751; Tue, 12 Jun 2001 09:15:18 -0400 (EDT) Date: Tue, 12 Jun 2001 09:15:18 -0400 (EDT) Message-Id: <200106121315.JAA15751@lub0127.lss.emc.com> X-Authentication-Warning: lub0127.lss.emc.com: gbruncot set sender to gbruncot@emc.com using -f From: Georges Brun-Cottan To: caml-list@inria.fr In-reply-to: <20010612173117N.garrigue@kurims.kyoto-u.ac.jp> (message from Jacques Garrigue on Tue, 12 Jun 2001 17:31:17 +0900) Subject: Re: [Caml-list] let mutable (was OCaml Speed for Block Convolutions) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 References: <20010612122114X.garrigue@kurims.kyoto-u.ac.jp> <200106120743.JAA25545@pauillac.inria.fr> <20010612173117N.garrigue@kurims.kyoto-u.ac.jp> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Bonjour Jacques, > > > the problem is not only with lvalues either. With for loops, you have > > > a case of rvalue, where something which is not syntactically a > > > function have a changing variable, which is accessed directly. The > > > fact you cannot change it yourself is not relevant. I think it is relevant: it is not uncommon in C to mistakenly transform a simple finite loop in an infinite one through side-effect to the loop control variable... The 'for' loop makes the point very clear that you are protected against this case. [...] and later on > If we take your previous argument of evidences in the compiler, the > loop variable is indeed compiled as a lvalue. There is no function > involved, and the for loop goes down to the backend. But it can not be assigned explicitely by the programmer, right? -- Georges ------------------- 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