From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id F31EBBC6C for ; Fri, 18 Jan 2008 18:52:08 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAFt1kEdDWxLC/2dsb2JhbACBV6xQ X-IronPort-AV: E=Sophos;i="4.25,217,1199660400"; d="scan'208";a="6291475" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Jan 2008 18:52:08 +0100 Received: from kuba.bertec.net (kuba.bertec.net [192.168.2.16]) by server1.bertec.net (Postfix) with ESMTP id 3929ACDFAD for ; Fri, 18 Jan 2008 12:52:07 -0500 (EST) From: Kuba Ober To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Strange performances Date: Fri, 18 Jan 2008 12:52:06 -0500 User-Agent: KMail/1.9.6 (enterprise 0.20071204.744707) References: <1200619933.6383.47.camel@benjamin-laptop> <20080118.181206.85503086.garrigue@math.nagoya-u.ac.jp> <4790D9FC.5090108@gmail.com> In-Reply-To: <4790D9FC.5090108@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801181252.06298.ober.14@osu.edu> X-Spam: no; 0.00; segfault:01 ocaml's:01 ocaml's:01 compiler:01 camlers:01 cheers:01 edgar:98 wrote:01 wrote:01 stack:01 caml-list:01 consistent:02 garrigue:03 slightly:03 seems:03 On Friday 18 January 2008, Edgar Friendly wrote: > Jacques Garrigue wrote: > > This is why I sent an erratum. The cause for the segfault was not the > > array access, but the stack overflow, which occured due to ocaml's > > peculiar evaluation order. > > Is there any case where ocaml's "peculiar evaluation order" results in > any benefit other than slightly simpler code at the compiler level? I > understand that people shouldn't depend on evaluation order, but it > seems that people fall into this trap often. And even extremely > experienced camlers (if you permit this characterization of you) forget > this behavior. I think that if you apply principle of least astonishment, things should be evaluated left-to-right. Or at least with a consistent rule. Cheers, Kuba