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 HAA17996; Sat, 25 May 2002 07:36:45 +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 HAA17769 for ; Sat, 25 May 2002 07:36:44 +0200 (MET DST) Received: from laurelin.dementia.org ([208.167.88.73]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4P5agf15581 for ; Sat, 25 May 2002 07:36:43 +0200 (MET DST) Received: by laurelin.dementia.org (Postfix, from userid 1001) id C538F703B; Sat, 25 May 2002 01:42:17 -0400 (EDT) To: Jacques Garrigue Cc: alex@baretta.com, caml-list@inria.fr Subject: Re: [Caml-list] What about polymorphic methods? References: <3CEF08ED.80407@baretta.com> <20020525125530P.garrigue@kurims.kyoto-u.ac.jp> From: John Prevost Date: 25 May 2002 01:42:17 -0400 In-Reply-To: <20020525125530P.garrigue@kurims.kyoto-u.ac.jp> Message-ID: <86y9e8g4w6.fsf@laurelin.dementia.org> 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 >>>>> "jg" == Jacques Garrigue writes: jg> With the CVS version, you would have to write jg> method left_iter : 'b. ('a -> 'b) -> 'b list = fun f -> ... jg> method right_iter : 'b. ('a -> 'b) -> 'b list = fun f -> ... jg> Of course, 'b is no longer a parameter of the class. Note jg> that polymorphic methods can only be called on objects whose jg> type is (at least partially) known, so you may have to add a jg> few extra type annotations to your code. They're coming back? Woohoo! What will the restrictions on typing be, precisely? John. ------------------- 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