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 NAA07944; Wed, 3 Jul 2002 13:26:42 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA07634 for ; Wed, 3 Jul 2002 13:26:41 +0200 (MET DST) Received: from leia.mandrakesoft.com (office.mandrakesoft.com [195.68.114.34]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g63BQe922182; Wed, 3 Jul 2002 13:26:40 +0200 (MET DST) Received: by leia.mandrakesoft.com (Postfix, from userid 505) id 068AE3EF1; Wed, 3 Jul 2002 13:25:56 +0200 (CEST) To: Francois.Pottier@inria.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] simple typing question References: <200207022059.WAA29845@pauillac.inria.fr> <20020703095131.A3909@pauillac.inria.fr> From: Pixel Date: 03 Jul 2002 13:25:56 +0200 In-Reply-To: <20020703095131.A3909@pauillac.inria.fr> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Francois Pottier writes: > On Wed, Jul 03, 2002 at 02:39:02AM +0200, Pixel wrote: > > > > based on the number of parameters of functions (given by the type). > > There is no such thing as the `number of parameters of a function' > in ML. Consider the following example: > > # let apply f x = f x;; > val apply : ('a -> 'b) -> 'a -> 'b = > # apply (fun x -> x) 1;; > - : int = 1 > # apply (fun x y -> x + y) 1 2;; > - : int = 3 > > ... and so on. You can write applications of `apply' with any > numbers of arguments. you're right... but this isn't a problem for the stuff i'm talking. If "wrapping-restoring-eta-equivalence" is done based on the number of parameters *before* instanciation of type variables, it will do. [...] > Besides, your restriction amounts to preventing functions from returning > functions, which doesn't make much sense in a functional language, in my > opinion. First of all i don't say it's practical/useful/whatever. But it doesn't prevent returning functions. It *does* change the evaluation strategy for functions returning functions. This changes the semantic: in "let f() = let v = foo in fun x -> bar" - if "foo" doesn't terminate, the semantic is different - if "foo" has side-effects, the semantic is different ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners