Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105451 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92407 invoked from network); 26 Apr 2019 04:27:26 -0000 Received: from unknown (HELO mail-vs1-f67.google.com) (209.85.217.67) by pb1.pair.com with SMTP; 26 Apr 2019 04:27:26 -0000 Received: by mail-vs1-f67.google.com with SMTP id r12so98277vsp.7 for ; Thu, 25 Apr 2019 18:28:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=50oVKcpE29UA1JwARxTVk0M9rTmsj9yDnDzfwXSYar8=; b=YXAtuPsgjldZPhXsomiWTaTJXcALHZtyTnssA5lMCdgp7j/DOy/EPi/BVce+wLPkvc iapOg5tjI4Ni2aukdGnVr6WDZadm1gm7pUwZH1kKvVRKBePY/i6jyR4s1VW5SnnfOGV5 sSTop2crzixXLe32Wba5bOyuuXaYfJx/gt1dC18w4Cmgl4Lm9KMeCRgD2iUYEafysWrz quwTjnnH08yu1RfNO7n8tWGcOsZJ3ZIj2/hd9sydEKjVrOA3HDTlDLXTSzfTWST/pMBd TR7CoNlm6tKWR95WvurJ20MOyv8Ar5l8yBU3GjgKM99sNFMqUPN5Xz/HT0AYXcS1UmUV /qKQ== X-Gm-Message-State: APjAAAXFuDQcAATFz/Iv/N5KFlskfndw2RGF06YVzXtZP6mrRoDDuLyD ipdISKw6Ht5MJuDPV7oQ0lTjwdehwgmEKr4eVvA= X-Google-Smtp-Source: APXvYqwAQjxOFwdXMRcjDrU1TsGYksb3m7y6MCZTk8iRxnU+FvODzu2Eu+4DNdY1BfDM8dZbSQ/vVRX9DcIKheVGddo= X-Received: by 2002:a67:e216:: with SMTP id g22mr97036vsa.197.1556242107733; Thu, 25 Apr 2019 18:28:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: bishop@php.net Date: Thu, 25 Apr 2019 21:28:02 -0400 Message-ID: To: Theodore Brown Cc: PHP internals , tpunt@php.net Content-Type: multipart/alternative; boundary="000000000000041c63058764daa8" Subject: Re: [PHP-DEV] Revive Number Format Separator RFC From: bishop@php.net (Bishop Bettini) --000000000000041c63058764daa8 Content-Type: text/plain; charset="UTF-8" On Thu, Apr 25, 2019 at 6:07 PM Theodore Brown wrote: > Is there any chance the Number Format Separator RFC [1] could be revived > for PHP 7.4? I looked at the discussion from a few years ago and it's not > clear why many people originally voted against it. > > JavaScript and Python have both gotten this feature recently and it's > something I really miss in PHP when declaring/reading large numbers. > > Maybe it would help to simplify how the restrictions are described in the > RFC. As I understand it, the only restriction is that each underscore in a > numeric literal must be between two digits. Perhaps the way the RFC > described this syntax made it seem more complex than it is. > > Best regards, > > Theodore Brown > > [1]: https://wiki.php.net/rfc/number_format_separator Subsequent conversation occurred on the voting thread [1], which wasn't included by reference in the RFP itself. The only dissent I saw in that thread came from Pascal Martin, speaking for AFUP, who wrote [2]: > it would be harder to search in code, as there would be more than > one way to write a number. Basically, it would break grep/find. > Splitting numbers so they are more readable is kind of a presentation > matter and, as such, could be done by an editor/IDE when displaying > code, without having to modify the code by hand Related: the RFC author Tom Punt also detailed the implementation, but didn't incorporate that by reference into the RFC [3]. Worth the read. With Tom's blessing, I'd support re-visiting this feature. It's useful, IMO. [1]: https://marc.info/?l=php-internals&m=145271098232484&w=2 [2]: https://marc.info/?l=php-internals&m=145320709922246&w=2 [3]: https://phpinternals.net/articles/implementing_a_digit_separator --000000000000041c63058764daa8--