Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105793 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96410 invoked from network); 29 May 2019 13:53:27 -0000 Received: from unknown (HELO es-i.jp) (180.42.98.130) by pb1.pair.com with SMTP; 29 May 2019 13:53:27 -0000 Received: (qmail 119739 invoked by uid 89); 29 May 2019 11:02:48 -0000 Received: from unknown (HELO mail-lj1-f177.google.com) (yohgaki@ohgaki.net@209.85.208.177) by 0 with ESMTPA; 29 May 2019 11:02:48 -0000 Received: by mail-lj1-f177.google.com with SMTP id r76so1954763lja.12 for ; Wed, 29 May 2019 04:02:48 -0700 (PDT) X-Gm-Message-State: APjAAAXoIIEUsSCGT/k+W/SoHaorl/S5jsS27o81j5fytruwbKK+ugkZ u3xZXxztk+WXRbavMgFhzVKqudiRUrMvzX7zmg== X-Google-Smtp-Source: APXvYqwgSFMW8f8uVIQ7dCpcuPP5MUiS0T0iejPaaShwnuipWx2ecqYD6Oc7+7W4bl+Z0EZjQgNqnSOo5kR6u+cxIWY= X-Received: by 2002:a2e:9bd2:: with SMTP id w18mr18568236ljj.120.1559127760283; Wed, 29 May 2019 04:02:40 -0700 (PDT) MIME-Version: 1.0 References: <1858501.VmE1D5L3rF@mcmic-probook> <39e8e5ad-6685-9406-68ac-1fb1edbeb537@fischer.name> In-Reply-To: <39e8e5ad-6685-9406-68ac-1fb1edbeb537@fischer.name> Date: Wed, 29 May 2019 20:02:03 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Markus Fischer Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000004fb69b058a04b81a" Subject: Re: [PHP-DEV] Re: [RFC] Numeric Literal Separator From: yohgaki@ohgaki.net (Yasuo Ohgaki) --0000000000004fb69b058a04b81a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 29, 2019 at 5:40 PM Markus Fischer wrote: > Hi, > > On 29.05.19 09:49, C=C3=B4me Chilliet wrote: > > What bugs me with this RFC is that it seems to be mainly intended for > grouping digits by 3, which from what I understand is cultural. > > At least some asian languages have a concept of > https://en.wikipedia.org/wiki/Myriad and group them by 4, at least from > the language point of view. > > It does seem when writing as numbers they still group by 3, but it seem= s > other usages exists: > > > https://japantoday.com/category/features/lifestyle/10-000-or-1-0000-japan= ese-schools-are-starting-to-move-commas-on-big-numbers-but-why > > My understanding from the RFC is that that the grouping is not relevant, > the `_` is stripped regardless. > > I would expected this all to work the same > > - 1_000_000 =3D> 1000000 > - 100_0000 =3D> 1000000 > - 1_0_0_0_0_0_0 =3D> 1000000 > > It even gives similar examples with the hex variant: > > 0x42_72_6F_77_6E; // with separator > > Am I wrong? > Simply ignoring "_" in numeric literal is nicer (and a bit faster) especially for hex/octal/bit. Hex may be grouped by 2,4,8,16,32 and so on. Bit fields may be grouped by any length. Regards, P.S. Even if it's easier for us, we don't use 1,0000 normally at least today. -- Yasuo Ohgaki yohgaki@ohgaki.net --0000000000004fb69b058a04b81a--