From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id BD001BBAF for ; Thu, 10 Sep 2009 14:35:08 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AosBAJqPqEpV2gB4mWdsb2JhbACbPwEBAQEBCAsKBxPBIIQYBQ X-IronPort-AV: E=Sophos;i="4.44,364,1249250400"; d="scan'208";a="32524860" Received: from emailfrontal1.citycable.ch ([85.218.0.120]) by mail2-smtp-roc.national.inria.fr with SMTP; 10 Sep 2009 14:35:08 +0200 Received: from [192.168.0.10] (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal1.citycable.ch (Postfix) with ESMTPA id 11FC012C28A; Thu, 10 Sep 2009 14:35:06 +0200 (CEST) Message-ID: <4AA8F16F.1040009@citycable.ch> Date: Thu, 10 Sep 2009 14:30:39 +0200 From: Guillaume Yziquel Reply-To: guillaume.yziquel@citycable.ch User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: caml-list@inria.fr Subject: polymorphic method. References: <4AA191F3.5000004@yziquel.homelinux.org> In-Reply-To: <4AA191F3.5000004@yziquel.homelinux.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; guillaume:01 guillaume:01 ocaml:01 compiler:01 inbound:98 polymorphic:01 polymorphic:01 declaration:02 objects:02 parameters:03 hint:04 quite:08 i'm:09 i'm:09 object:09 Hello. When developing with objects in OCaml, I'm quite often faced with polymorphic methods. Such as: class myobject = object method id x = x end Sometimes you have many methods that you're tinkling with, and the compiler keeps saying to you that 'a is inbound in this class declaration. I'm therefore wondering if it would be a good idea to have a keyword 'polymorphic', and one would write class myobject = object polymorphic method id x = x end The polymorphic keyword would be a hint that the method is polymorphic and that there is no need to look at the class' type parameters. -- Guillaume Yziquel http://yziquel.homelinux.org/