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.3 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 50490BB84 for ; Wed, 14 Jan 2009 16:39:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AosBAOOVbUlRZ90vlGdsb2JhbACNUIZGAQEBAQkLCAkRA7lshW8 X-IronPort-AV: E=Sophos;i="4.37,263,1231110000"; d="scan'208";a="22469052" Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Jan 2009 16:39:56 +0100 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090114153955.YKI2989.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Wed, 14 Jan 2009 15:39:55 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090114153955.YXWX22934.aamtaout04-winn.ispmail.ntl.com@romulus.metastack.com>; Wed, 14 Jan 2009 15:39:55 +0000 Received: from Countertenor ([149.254.192.218]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id n0EFdnKV002115 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 14 Jan 2009 15:39:52 GMT From: "David Allsopp" To: "'Dawid Toton'" , References: <1231924711.2711.11.camel@serphost.localdomain> <496DEC48.7000906@wp.pl> In-Reply-To: <496DEC48.7000906@wp.pl> Subject: RE: [Caml-list] What is a future of ocaml? Date: Wed, 14 Jan 2009 15:39:35 -0000 Organization: MetaStack Solutions Ltd. Message-ID: <001801c9765e$4fabc3b0$ef034b10$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acl2Tke/R68XW5gLRK+5JqF/TXD/YwADpqTw Content-Language: en-gb X-Scanned-By: MIMEDefang 2.64 on 81.102.132.74 X-Cloudmark-Analysis: v=1.0 c=1 a=NNKVIpxObBgA:10 a=Sq0X1oZEF30A:10 a=RryYD8zE1kScfZzI2MIA:9 a=SEdzo8RrKcL94dTS2e526PBSE7MA:4 a=oltf0pfCdT4A:10 X-Spam: no; 0.00; ocaml:01 ocaml:01 inference:01 annotations:01 variants:01 annotations:01 polymorphic:01 wrote:01 typing:01 caml-list:01 arbitrary:02 expression:02 objects:02 problem:05 anybody:07 Dawid Toton wrote: > Could anybody explain why it's impossible to have type classes in OCaml? I don't think it's impossible - but I believe that if you introduce type classes then you "damage" Hindley-Milner type inference and you can no longer derive a principal typing for an arbitrary ML expression without resorting to type annotations. Whether this is a problem or not is a matter of taste - but it does make the language harder to call "ML" if you lose one of its central features! That said, there are of course two big features (objects and polymorphic variants) in OCaml already which do require annotations. David