From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 70AFFBB91 for ; Sat, 29 Jan 2005 10:55:22 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0T9tLfD014914 for ; Sat, 29 Jan 2005 10:55:21 +0100 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 KAA04527 for ; Sat, 29 Jan 2005 10:55:21 +0100 (MET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0T9tKoG014910 for ; Sat, 29 Jan 2005 10:55:20 +0100 Received: by rproxy.gmail.com with SMTP id i8so13162rne for ; Sat, 29 Jan 2005 01:55:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=lP6+fo5aJhHGuqt8mzLQAFZW00XlMxnV9gjrEggyZ2Ck0L8wh2+hxVMvfyaanbVJvgA2EZEVKJEkhBSqEz1aBDQzqLoKLQ1SwlUbVu+c3SeNn+0w2DPB4b02YQcLPuCWi1rAfoJtXveu1PqMIwQeaL2T3waLCVMvNxRW6zt9K6w= Received: by 10.38.96.6 with SMTP id t6mr41384rnb; Sat, 29 Jan 2005 01:55:19 -0800 (PST) Received: by 10.38.65.58 with HTTP; Sat, 29 Jan 2005 01:55:19 -0800 (PST) Message-ID: <7f8e92aa0501290155dde6f47@mail.gmail.com> Date: Sat, 29 Jan 2005 11:55:19 +0200 From: Radu Grigore Reply-To: Radu Grigore To: Jacques Garrigue Subject: Re: [Caml-list] 'a Set? Cc: caml-list@inria.fr In-Reply-To: <20050126.210400.42882977.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <16887.21524.707176.646417@gargle.gargle.HOWL> <001401c5038f$c0ad0ba0$0100a8c0@mshome.net> <7f8e92aa05012603042437cf1c@mail.gmail.com> <20050126.210400.42882977.garrigue@math.nagoya-u.ac.jp> X-Miltered: at nez-perce with ID 41FB5D89.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41FB5D88.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 semantics:01 functions:01 functions:01 jacques:01 parameter:02 parameter:02 seems:03 garrigue:03 garrigue:03 library:03 side-effects:04 habit:05 radu:05 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Wed, 26 Jan 2005 21:04:00 +0900 (JST), Jacques Garrigue wrote: > There seems to be an habit of having side-effecting functions take > their "object" as first parameter, while side-effect-free functions > take them as last. This makes sense; but it does not seem to be respected by the standard library. For example Queue does modifications in place and doesn't take the queue as the first parameter. Another example is List.nth which does not have side-effects but takes the list as the first parameter. And I didn't even tried to look for examples that don't follow your rule: I was more or less randomly browsing the manual. > If you respect this convention, the type tells you about the semantics > :-) It is a good convention and I'll try follow it. Thanks. -- regards, radu http://rgrig.idilis.ro/