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=1.7 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 0EB0CBB84 for ; Thu, 14 Aug 2008 22:53:27 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmkCANI1pEjRVdkPo2dsb2JhbACRQT4BAQEBAQEHBQgHEZ1chwgBAg X-IronPort-AV: E=Sophos;i="4.32,211,1217800800"; d="scan'208";a="28229812" Received: from mail-gx0-f15.google.com ([209.85.217.15]) by mail4-smtp-sop.national.inria.fr with ESMTP; 14 Aug 2008 22:53:26 +0200 Received: by gxk8 with SMTP id 8so3901645gxk.3 for ; Thu, 14 Aug 2008 13:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=TONfc/XWIZowV9jIrlaucsljIZCetMQnkv6PBrbrDX0=; b=IbYrYd04xlg43le+GoG/0oSZHail3JOyg0lROndPrGw8zc3i/+WFNYJb2ADwkQmX/z S4k9ZxL6OXx1arKuNTFYiERZcAMLU5WCPUHZuBjPKqwb6Pg+nqkiuW++HSPM81oOW6Ii OB1LTHmMOXmRveGWGr5+wY0J8YSH+qoUGmCG8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=lxDbPnZAdpkjZMW4Y2hjt6nnkSDJfkWzIWa/ZYch+aYfzLpYeY3wV9fWDklDQKEKOh hxbuAi4ltZapVelxCpKuV6A8mHFgAftQra7B/CQeLg3WzmKmBdyBaX34jFuu/DHNQK8R 33UGqv3G/OdUxWkIIQovwua0x1KjN3WILyGgM= Received: by 10.150.186.21 with SMTP id j21mr2463829ybf.26.1218747204913; Thu, 14 Aug 2008 13:53:24 -0700 (PDT) Received: by 10.150.145.10 with HTTP; Thu, 14 Aug 2008 13:53:24 -0700 (PDT) Message-ID: Date: Thu, 14 Aug 2008 13:53:24 -0700 From: "Nathaniel Gray" To: "Jim Farrand" Subject: Re: [Caml-list] Typeclasses in OCaml (Was: Haskell vs OCaml) Cc: "Caml Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Spam: no; 0.00; ocaml:01 haskell:01 ocaml:01 haskell:01 sig:01 syntax:01 popl:01 cheers:01 peng:98 peng:98 wrote:01 caml-list:01 theoretical:03 cfm:95 caltech:05 On Thu, Aug 14, 2008 at 7:46 AM, Jim Farrand wrote: > 2008/8/14 Peng Zang : > >> In Haskell you can write a function that takes anything that is "showable" (a >> type class) and print it out. The sig would be something like (I'm mixing >> OCaml and Haskell syntax here, but hopefully the point is still clear): > > Out of curiosity, are there any theoretical reasons why OCaml could > not be extended with type classes? They are one of my favourite > features of Haskell, and I think they would really improve OCaml. It could be done. See this paper from POPL '07: http://portal.acm.org/citation.cfm?id=1190215.1190229 Cheers, -n8 -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu -->