From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 4907DBBAF for ; Mon, 9 Aug 2010 15:10:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At4CAFCbX0zRVdc0kGdsb2JhbACgPQgVAQEBAQkJDAcRAx+nYokQghGFXy6IVAEBAwWFNQSJOw X-IronPort-AV: E=Sophos;i="4.55,342,1278280800"; d="scan'208";a="55230430" Received: from mail-ew0-f52.google.com ([209.85.215.52]) by mail3-smtp-sop.national.inria.fr with ESMTP; 09 Aug 2010 15:10:44 +0200 Received: by ewy20 with SMTP id 20so3997933ewy.39 for ; Mon, 09 Aug 2010 06:10:44 -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 :content-transfer-encoding; bh=po36rTIC3aS1/AroG+hayt8waXKZI2rA9PVJqnutMHU=; b=Odq+P5vgdcVeXMjaA4QBjReMDC4Ld880zE+tFpX3393Qaw97MkYwe6X/DPCdeTpQMZ LWsC9BH0vssmui6JqjERXQg5sE/yKd9TSD3gwpVEA5JJSdnenVP796nWS7e+pEKVYOC0 FwOC55TvsNWTGrRhsRj9e2FME/23PAXggTQxs= 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:content-transfer-encoding; b=Nil9EmjusIvqs2OTS29oVNSFLl62f7SuHOgZGo2W0AKn1aoiumN/CS7L3Thhwqpqmy Dwp7DJhb88DImNgz7N6JZPC5qav7h4s4Wt0wA7/9V8bBHdKF7QHaAW9Rb6muRLeJinmq lsZOOJfIJCxD8Ke0XfMiavp26ciB6mpreQTp4= MIME-Version: 1.0 Received: by 10.213.19.211 with SMTP id c19mr11997808ebb.93.1281359444229; Mon, 09 Aug 2010 06:10:44 -0700 (PDT) Received: by 10.14.121.16 with HTTP; Mon, 9 Aug 2010 06:10:43 -0700 (PDT) In-Reply-To: References: <877hk1m1df.fsf@mid.deneb.enyo.de> <87bp9dkkca.fsf@mid.deneb.enyo.de> <4c5f194e.8644d80a.7fef.69e6@mx.google.com> Date: Mon, 9 Aug 2010 09:10:43 -0400 Message-ID: Subject: Re: [Caml-list] interest in a much simpler, but modern, Caml? From: David House To: bluestorm Cc: Jeremy Bem , caml-list List , Florian Weimer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; infix:01 val:01 bool:01 infix:01 haskell:01 polluting:01 unqualified:98 char:01 char:01 wrote:01 caml-list:01 int:01 int:01 explicitly:02 caml:02 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", =E0 la Python or Haskell, such 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 Or even, in 3.12, let mod, of_char, to_char =3D Int.(mod, of_char, to_char)