From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA02291 for caml-red; Fri, 13 Oct 2000 21:43:00 +0200 (MET DST) 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 QAA24476 for ; Fri, 13 Oct 2000 16:21:53 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e9DELqD17050; Fri, 13 Oct 2000 16:21:52 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id QAA11264; Fri, 13 Oct 2000 16:21:49 +0200 (MET DST) Date: Fri, 13 Oct 2000 16:21:49 +0200 From: Markus Mottl To: Judicael Courant Cc: Pierre Weis , caml-list@inria.fr Subject: Re: Undefined evaluation order Message-ID: <20001013162149.B28002@miss.wu-wien.ac.at> References: <200010112035.WAA29763@pauillac.inria.fr> <39E6B441.2809109F@lri.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <39E6B441.2809109F@lri.fr>; from Judicael.Courant@lri.fr on Fri, Oct 13, 2000 at 09:05:37 +0200 Sender: weis@pauillac.inria.fr On Fri, 13 Oct 2000, Judicael Courant wrote: > BTW, my 2 cents worth opinion about the evaluation order : > when I program in a high-level language such as Caml, performance is not > my primary concern. My primary concerns are correctness and development > costs. Only the OCaml developpers should be concerned with performance. > Therefore, I would clearly vote for a more natural, somewhat less > efficient semantics (deterministic evaluation order) against a somewhat > more efficient, less natural semantics. I also agree on this. Of course, it all depends on the real tradeoff associated with fixing evaluation order to left-to-right. If it were, say, 10%, would anybody really care? If it were 100% - hm, possibly already relevant for some cases. Are there any estimates so that we know how much efficiency loss we are talking about? My suggestion would be to make the "sane" left-to-right evaluation order the default and to provide a flag "-unsafe-eval-order" or so to let the compiler choose "at will": this (unsafe) warns the user about unintended effects. Is this reasonable and sufficiently easy to implement? Of course, writing functional programs that depend on evaluation order diminishes their "functional flavour" and should always be avoided: but working against intuition is always a bad idea, too. Best regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl