From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7GKIoTO031964 for ; Tue, 16 Aug 2011 22:18:50 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuAIAF7QSk5QW+UMgWdsb2JhbABBiRCQIo8JBgIUAQEWJiWBQAEBBAE6RAsBCiElDwEEKBsZh3ACui+GSASHX5gqhBw X-IronPort-AV: E=Sophos;i="4.68,235,1312149600"; d="scan'208";a="116020645" Received: from lo.gmane.org ([80.91.229.12]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Aug 2011 22:18:44 +0200 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QtQ5z-0003Dy-0p for caml-list@inria.fr; Tue, 16 Aug 2011 22:18:43 +0200 Received: from 174.121.218.178 ([174.121.218.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Aug 2011 22:18:42 +0200 Received: from jeffsco by 174.121.218.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Aug 2011 22:18:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Jeffrey Scofield Date: 16 Aug 2011 15:18:29 -0500 Sender: jeffsco@pse.psellos.com Message-ID: References: <20110816152550.GA21081@annexia.org> <20110816155137.GA18365@ccellier.rd.securactive.lan> <20110816161042.GA31932@annexia.org> <20110816162205.GC31932@annexia.org> <20110816162719.GD31932@annexia.org> <4E4A9C17.7060605@gmail.com> <1313524000.20782.6.camel@gps-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 174.121.218.178 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-Validation-by: jeffsco@psellos.com Subject: [Caml-list] Re: Interfacing with C: bad practice Gerd Stolpmann writes: > I don't know for SML, but OCaml also leaves the order unspecified in > which function arguments are evaluated (and ocamlc and ocamlopt behave > even differently in this respect). So I think the problem would > translate to OCaml in some form. This is a good point. A problem with C (and almost every other language) is that there's a lot of room for debate about what the *standard* means (as opposed to the meaning of particular programs). With the ML family you have a formal framework (lambda calculus, I guess) that makes things quite a bit less ambiguous. You can still have unspecified parts of the semantics, but at least it's clearer where the unspecified parts are! I don't know offhand whether parameter evaluation order is defined for Standard ML, either. But there's a very clear specification that you can look at to find out. (It seems like the sort of thing that would be defined in SML.) Jeffrey