From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 06479BBAF for ; Sun, 8 Aug 2010 22:59:52 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AisCAHO3XkzRVdY0kGdsb2JhbACgPAgVAQEBAQkJDAcRAx+nS4kQghGFAC6IVAEBAwWFNQSJOw X-IronPort-AV: E=Sophos;i="4.55,338,1278280800"; d="scan'208";a="56864462" Received: from mail-bw0-f52.google.com ([209.85.214.52]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Aug 2010 22:59:51 +0200 Received: by bwz17 with SMTP id 17so1074289bwz.39 for ; Sun, 08 Aug 2010 13:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=sBVko6jktvot2TMcklXj4YOvbZxIHPAyGnV+AWX1kmo=; b=Cet9K/xPwhgMqXH23n0wNl9LyETTQ0yC56T5URRLgN0ZXXCNahBrRMMZQzBGmtgGOA QVkAbkz99cBPgWpReSkqqzwudDKZZ9q86uG4WY2O4Hhdj0cLr/6VaO2CPjru0uSrFpHB 729cHCQnL5aRmyXCmQGEPZqt3tIqI86R7EeZ4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=n/87teOmPcqhp/khExqG591Ed++FTo9rr/b2nYapOf5UawC2kXkMEofAJZW0VOMpoN KYUY2JKslZQf+9WzWUnaV28ApzdrZb8DFeAnQ4qEWi/2yfC0TZai4Ghg8eAxssgqYhMb zzajNAmd1pGVYfG37AuUZ4gk1C1/Pgv0M7vyo= MIME-Version: 1.0 Received: by 10.204.54.193 with SMTP id r1mr2283625bkg.123.1281301191283; Sun, 08 Aug 2010 13:59:51 -0700 (PDT) Received: by 10.204.54.68 with HTTP; Sun, 8 Aug 2010 13:59:51 -0700 (PDT) In-Reply-To: <4c5f194e.8644d80a.7fef.69e6@mx.google.com> References: <877hk1m1df.fsf@mid.deneb.enyo.de> <87bp9dkkca.fsf@mid.deneb.enyo.de> <4c5f194e.8644d80a.7fef.69e6@mx.google.com> Date: Sun, 8 Aug 2010 16:59:51 -0400 Message-ID: Subject: Re: [Caml-list] interest in a much simpler, but modern, Caml? From: Jeremy Bem To: Nicolas Pouillard Cc: Florian Weimer , caml-list List Content-Type: multipart/alternative; boundary=001636c5b0185b5437048d562e56 X-Spam: no; 0.00; 0200,:01 notation:01 ocaml:01 0200,:01 notation:01 ocaml:01 equality:01 equality:01 polymorphic:01 polymorphic:01 wrote:01 wrote:01 syntactic:01 syntactic:01 caml-list:01 --001636c5b0185b5437048d562e56 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Aug 8, 2010 at 4:53 PM, Nicolas Pouillard < nicolas.pouillard@gmail.com> wrote: > On Sun, 08 Aug 2010 20:52:53 +0200, Florian Weimer > wrote: > > * Jeremy Bem: > > > > > Yes and no, respectively. In other words, nothing new here. > > > > Oh. I just happen to think that those two are very high on the list > > of things you want to fix once you can start with a clean slate. > > > > > Is there a better approach to polymorphic equality floating around? > > > > Besides type classes? I'm not sure. It's probably possible to remove > > this feature from the language, with a little bit of syntactic > > overhead to pass around a matching comparison function. > > Yes for instance the very concise local opening notation comes in handy > here: > > if Int.(x = 42) then ... else ... > That's very nice. I don't think type classes are conservative enough for this project, but this comes very close indeed. I haven't really had a chance to explore OCaml 3.12 yet, as it came out while I was working on this, but I will give this serious consideration. -Jeremy --001636c5b0185b5437048d562e56 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Sun, Aug 8, 2010 at 4:53 PM, Nicolas Pouillar= d <nico= las.pouillard@gmail.com> wrote:
On Sun, 08 Aug 2010 20:52:53 +0200, Flori= an Weimer <fw@deneb.enyo.de> = wrote:
> * Jeremy Bem:
>
> > Yes and no, respectively. =A0In other words, nothing new here. >
> Oh. =A0I just happen to think that those two are very high on the list=
> of things you want to fix once you can start with a clean slate.
>
> > Is there a better approach to polymorphic equality floating aroun= d?
>
> Besides type classes? =A0I'm not sure. =A0It's probably possib= le to remove
> this feature from the language, with a little bit of syntactic
> overhead to pass around a matching comparison function.

Yes for instance the very concise local opening notation comes = in handy here:

if Int.(x =3D 42) then ... else ...

Tha= t's very nice. =A0I don't think type classes are conservative enoug= h for this project, but this comes very close indeed.

I haven't really had a chance to explore OCaml 3.12 yet, as it cam= e out while I was working on this, but I will give this serious considerati= on.

-Jeremy
--001636c5b0185b5437048d562e56--