From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q18GUEnn003589 for ; Wed, 8 Feb 2012 17:30:14 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqkBADuiMk/AbSoIhWdsb2JhbABDhRGnTYIrIgEBAQoLCxsEI4FyAQEFI1YQCwkFCgICJgICFBgxiBKoW4oXE4EciiICAh0EBgEuBA8GhA8NBQQggiQzYwSNYodKkl8 X-IronPort-AV: E=Sophos;i="4.73,384,1325458800"; d="scan'208";a="143425914" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Feb 2012 17:30:09 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from first (e178010107.adsl.alicedsl.de [85.178.10.107]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id q18GU8MW027210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 8 Feb 2012 17:30:08 +0100 Received: by first (Postfix, from userid 1000) id 12D65154022C; Wed, 8 Feb 2012 17:30:08 +0100 (CET) Date: Wed, 8 Feb 2012 17:30:08 +0100 From: oliver To: David House Cc: Gabriel Scherer , Matej =?utf-8?B?S2/FocOtaw==?= <5764c029b688c1c0d24a2e97cd764f@gmail.com>, caml-list@inria.fr Message-ID: <20120208163007.GB4920@siouxsie> References: <4F326EA6.20900@gmail.com> <4F32741C.4040501@janestreet.com> <20120208133926.GC1823@siouxsie> <4F327CBF.4030005@janestreet.com> <20120208135818.GG1823@siouxsie> <4F3282B1.1050205@janestreet.com> <4F328BCF.9030902@janestreet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F328BCF.9030902@janestreet.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] syntactic detail On Wed, Feb 08, 2012 at 02:50:55PM +0000, David House wrote: > On 02/08/2012 02:39 PM, Gabriel Scherer wrote: > >People. Please. Tell me you are *not* arguing over underscores in > >numeric literals ! > > This is not totally academic. I have come across the exact bug I > describe. It was painful. [...] Let me guess where the problem might be came from: When i think of code that uses a value 1_000_000 and you want to change it to a value ten times higher, it should be changed to 10_000_000 Coming from notation that does NOT allow "_" in tzhe numbers, it could be done by just adding one "0" at the end of the value: 1000000 becomes 10000000 ^ with the "0" added at the end. But also correct ("more correct" would be: 1000000 becomes 10000000 ^ "0" added at the millions. "Just add one "0" at the end" Is the edit-habit, which works fine. But when allowing "_" inside numbers, but people don't change the "wrong" editing behaviour, then allowing the "_" at all means introducing a new kind of possible errors. This could be an argument to throw "_" at all, because adding a "0" after the "1" instead of just adding a "0" at the end is rarely used behaviour of editing, and some people might call it "weird". ;-) So this argument also could be used to disallow "_" at all. But no, thats not what I want to argue for ;-) OK, let's stop that discussion now. If someone thinks the three-digit-distance-"_" is a feature that makes sense, a feature wish could be added for OCaml. ;-) Ciao, Oliver