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 OAA16764; Fri, 14 Dec 2001 14:26:50 +0100 (MET) 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 OAA16773 for ; Fri, 14 Dec 2001 14:26:39 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBEDQcj02642 for ; Fri, 14 Dec 2001 14:26:39 +0100 (MET) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id fBEDQch20428 ; Fri, 14 Dec 2001 14:26:38 +0100 (CET) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.9.2/jb-1.1) id OAA02405 ; Fri, 14 Dec 2001 14:26:38 +0100 (MET) Date: Fri, 14 Dec 2001 14:26:38 +0100 (MET) From: Alain Frisch To: Diego Olivier Fernandez Pons cc: Bruno Pagano , Caml Subject: Re: [Caml-list] Function call with a list of parameters In-Reply-To: <002e01c1836d$4ecfce00$0a53f2c3@Utilisateur> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 13 Dec 2001, Diego Olivier Fernandez Pons wrote: > I am afraid I do not understand how are cyclic types and OOP related. > Could you explain more precisely this point ? Cyclic (aka recursive) types are necessary to type such an expression: # fun x -> x # run (); x;; - : (< run : unit -> 'b; .. > as 'a) -> 'a = Note that recursive constructed (variant,record) types are not considered cyclic: type 'a tree = Leaf | Node of 'a * 'a. Except for objects, recursive types are often unecessary; allowing them may hide or deplace type errors, and make error messages difficult to understand. Moreover, they sensibly complexify the implementation. I don't want to speak for the OCaml team, but it seems reasonnable to consider that recursive types are supported in OCaml only because of OOP ... Alain ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr