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 BAA18413; Tue, 20 Nov 2001 01:29:48 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 BAA18779 for ; Tue, 20 Nov 2001 01:29:47 +0100 (MET) Received: from favie.faith.gr.jp (favie.faith.gr.jp [61.127.175.250]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fAK0Tj100081 for ; Tue, 20 Nov 2001 01:29:45 +0100 (MET) Received: from localhost (dhcp7.faith.gr.jp [192.168.1.17]) by favie.faith.gr.jp (8.9.3/8.9.3) with ESMTP id JAA22699; Tue, 20 Nov 2001 09:29:39 +0900 To: frisch@clipper.ens.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Polymorphic methods In-Reply-To: References: X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20011120092918S.garrigue@kurims.kyoto-u.ac.jp> Date: Tue, 20 Nov 2001 09:29:18 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Alain Frisch > is there any plan to add polymorphic methods to OCaml ? The more I use > objects, the more I miss this feature. There is a poly_meth branch in > the CVS, but it does not seem really active nowadays ... After two years, my promises may seem void, but I intend to implement polymorphic methods, probably as soon as 3.03 is released. Or should I start before? This is a rather large chunk of work, modifying very sensitive parts of the compiler... What would you need them for? One reason I was not so eager to start working on them is that they do not solve all problems of polymorphism. For instance, you cannot define a map method, even with polymorphic methods. > Did OLabl raise some practical problems with polymorphic methods ? There was a problem of compilation speed. I have now a few ideas of how to improve it, but this may still mean that the change would only be provided as a patch. Another problem is that such methods cannot be inferred. As a result you can have strange type errors, because you used a method before knowing its actual type. In OLabl there was a warning every time you used a method whose type was unkwown, but I have been told it was not very Caml-like. Jacques Garrigue ------------------- 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