From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 70538BBAF for ; Mon, 9 Aug 2010 16:03:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8CAHSnX0xKfVK0kGdsb2JhbACDFZ0oCBUBAQEBCQkMBxEDH6gLiFQ8ghGFZS6IVAEBAwWBIYMhcwSEJg X-IronPort-AV: E=Sophos;i="4.55,343,1278280800"; d="scan'208";a="65191817" Received: from mail-wy0-f180.google.com ([74.125.82.180]) by mail1-smtp-roc.national.inria.fr with ESMTP; 09 Aug 2010 16:03:31 +0200 Received: by wya21 with SMTP id 21so11738218wya.39 for ; Mon, 09 Aug 2010 07:03:30 -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:subject :to:cc:in-reply-to:references:mime-version:content-type:content-id :content-transfer-encoding; bh=eX8I9u8Vfm9R91eymftpcBLeuidITR0qLKCmWRKI8ZE=; b=lAgs/9c6aanvrIDSqCP38cSsHs9KsctN3W1ypi7A18SOQ2MRglU22LizUkJtVnQbeC bP4udnEk+MdVuBelfG37L/m1Q32i6dYXHpG1+uqK21HSNuaVgpsCZyrtVDvTpolZDOTo IjHeoOSa4j/sTCzw/xrsWRtz3ZLZZV6mlI7L8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:subject:to:cc:in-reply-to:references :mime-version:content-type:content-id:content-transfer-encoding; b=Jkius/4qGjOvJxbYqiBESTe7Cbnx/eAYAEMjoFf7y4OXcYDuxBG/tyxcnL91S+wkcK 1e32xvLsLs2IjSYj1gqYsOBvmcCSvbnB8nFHelin5yoyO3g+A9/O94/OuSVEFyhTxyAv 0sMSNSqrV6ZaDuGt2tE0lqvqIaJsfyL3bjLFw= Received: by 10.227.128.201 with SMTP id l9mr14116209wbs.22.1281362610704; Mon, 09 Aug 2010 07:03:30 -0700 (PDT) Received: from localhost (sk.feydakins.org [94.23.4.142]) by mx.google.com with ESMTPS id u32sm2576903weq.35.2010.08.09.07.03.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Aug 2010 07:03:30 -0700 (PDT) Message-ID: <4c600ab2.a0ebd80a.5159.77be@mx.google.com> Date: Mon, 09 Aug 2010 07:03:30 -0700 (PDT) From: Nicolas Pouillard Subject: Re: [Caml-list] interest in a much simpler, but modern, Caml? To: David House , bluestorm Cc: Jeremy Bem , caml-list List , Florian Weimer In-Reply-To: References: <877hk1m1df.fsf@mid.deneb.enyo.de> <87bp9dkkca.fsf@mid.deneb.enyo.de> <4c5f194e.8644d80a.7fef.69e6@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <29686.1281362609.1@sk.feydakins.org> Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; infix:01 val:01 bool:01 infix:01 haskell:01 polluting:01 constructors:01 constructors:01 afaik:01 unqualified:98 char:01 char:01 wrote:01 wrote:01 caml-list:01 On Mon, 9 Aug 2010 09:10:43 -0400, David House wrote: > On 8 August 2010 17:47, bluestorm wrote: > > If you don't have any of these, you have to declare infix operators > > directly inside the module. You'd have a "val (=3D) : int -> int -> > > bool" in the "int.ml" file for example. That's notoriously painful to > > handle if you use the "open" statement : a bunch of "open" statements > > in a non-careful order and your infix operators become unusable > > because you don't know anymore where they come from. What you really > > need is some form of "explicit open", =C3=A0 la Python or Haskell, suc= h as > > "from Int import (mod, of_char, to_char)" instead of the full open : > > only a few identifiers are unqualified, and you still use Int.(=3D), > > Int.(+) instead of polluting the global namespace. > = > If you're willing to explicitly name the things you wish to import > then this doesn't seem to be a hard problem to solve: > = > let mod =3D Int.mod > let of_char =3D Int.of_char > let to_char =3D Int.tochar You may want to import types, data constructors, exceptions, modules as well... While some of them can be mitigated data constructors cannot AFAIK= . -- = Nicolas Pouillard http://nicolaspouillard.fr