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 PAA27762; Sun, 10 Jun 2001 15:12:57 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA27810 for ; Sun, 10 Jun 2001 15:12:56 +0200 (MET DST) Received: from mail47.fg.online.no (mail47-s.fg.online.no [148.122.161.47]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f5ADCtj23240 for ; Sun, 10 Jun 2001 15:12:55 +0200 (MET DST) Received: from online.no (ti41a03-0216.dialup.online.no [130.67.36.216]) by mail47.fg.online.no (8.9.3/8.9.3) with ESMTP id PAA04292; Sun, 10 Jun 2001 15:12:53 +0200 (MET DST) Message-ID: <3B2371EE.A4FF2E51@online.no> Date: Sun, 10 Jun 2001 15:11:10 +0200 From: Tore Lund X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: caml-list@inria.fr CC: Sebastien Carlier Subject: Re: [Caml-list] Evaluation Order References: <001501c0f139$9ce86640$210148bf@dylan> <5.1.0.14.0.20010609175833.03bdda20@chasm.org> <3B235796.73CA31A@online.no> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Tore Lund wrote: > > # let _ = > print_string "before"; > print_string "MIDDLE"; > print_string "after";; > beforeMIDDLEafter- : unit = () > > # let _ = > print_string "before"; > Format.print_string "MIDDLE"; > print_string "after";; > beforeafterMIDDLE- : unit = () > > What's going on here? All I did was to add "Format". Is not printing > an "effet du bord"? For that matter: # let a = print_string "before" in let b = print_string "MIDDLE" in let c = print_string "after" in a; b; c;; beforeMIDDLEafter- : unit = () versus: # let a = print_string "before" in let b = Format.print_string "MIDDLE" in let c = print_string "after" in a; b; c;; beforeafterMIDDLE- : unit = () Okay. So there is buffering at work that has little to do with OCaml. Which probably means that the only side-effects guaranteed to happen in a certain order are those carried out by the runtime system itself. Hmmm, at the very least this makes it necessary to distinguish between two species of side-effect. -- Tore ------------------- 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