Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83173 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92949 invoked from network); 19 Feb 2015 12:16:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 12:16:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.169 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.214.169 mail-ob0-f169.google.com Received: from [209.85.214.169] ([209.85.214.169:46927] helo=mail-ob0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/21-18870-914D5E45 for ; Thu, 19 Feb 2015 07:16:26 -0500 Received: by mail-ob0-f169.google.com with SMTP id wp4so13608689obc.0 for ; Thu, 19 Feb 2015 04:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MvxV2/D49kO+FgODXVz4Kbi6Q99nrkEEXisI6BrSGec=; b=Ds0GRmwKaauZL82kSHwR6okqxQlFcsPTOC+5b2aXfUmjew38UdLwDbrZAcQWtxUuwT VwWIBm3Q9MlOgIZGkifEwFWMOKzoB9yWqjRu3Y/qnprSGj3P4GxQvvO8oJacUWaD6P24 mR+UDyTHFZSv+uSuX99uMaOgRQxU62G9Sc3nBohYAv1sRcvUOOoQtMflNGNvyu5SwBoJ dpKXKzM3/zdcVawWoEVnUF67rxhQ2Z+tfgsB4Ypr5ALq4GXI8cB+oEYFpHqx+Z1/af5O YUt/0RuzwTj9BSQ9VZ56HmjnE1CagRxkgnF5osFVu+Gl8hIjCyl1tmtM9euTwx/F8V1V bsBw== MIME-Version: 1.0 X-Received: by 10.60.149.232 with SMTP id ud8mr2681579oeb.51.1424348183113; Thu, 19 Feb 2015 04:16:23 -0800 (PST) Received: by 10.202.59.10 with HTTP; Thu, 19 Feb 2015 04:16:22 -0800 (PST) In-Reply-To: <54E54E1E.1010906@lerdorf.com> References: <54E5456E.4020103@gmx.de> <54E54E1E.1010906@lerdorf.com> Date: Thu, 19 Feb 2015 16:16:22 +0400 Message-ID: To: Rasmus Lerdorf , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b41c5dc7dc31b050f6fe79b Subject: Re: [PHP-DEV] Digit separators for numeric literals From: inefedor@gmail.com (Nikita Nefedov) --047d7b41c5dc7dc31b050f6fe79b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2015-02-19 6:44 GMT+04:00 Rasmus Lerdorf : > > I think it will be difficult to find a separator character that doesn't > make a mess of the grammar. > > my_func(1,999,999) obviously doesn't work > my_func(1'999'999) as per C++14 clashes with our single-quoted strings > my_func(1_999_999) like in ADA might work > > but _999_ would need to work as well and _ is a valid char in a constant > so you can have a constant named _999_. > > - nope > # nope > @ nope > ~ nope > ! nope > % nope > ^ nope > > We went through this for the namespace char, and there simply isn't a > typable single character left to use for something like this. _ is the > closest but it would require some changes and BC breaks which I am not > sure is worth for what appears to me to be a not-so critical feature. > > Now if we went into Unicode territory, we could do it. eg. > > my_func(1 999 999) U+1680 (although it looks too much like a -) > my_func(1 999 999) U+205F (mathematical space) > my_func(1=D9=AC999=D9=AC999) U+066C (Arabic thousands separator) > my_func(1=C2=B7999=C2=B7999) U+00B7 (middle dot) > > The last one looks best to me, but we'd need a team of people working in > shifts to answer the, "How do I type this?" question. > > -Rasmus > > Hey, Why not space? It's certainly possible (I just checked) and it would look clear I guess: my_func(1 999 999); --047d7b41c5dc7dc31b050f6fe79b--