Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105497 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76393 invoked from network); 29 Apr 2019 10:31:39 -0000 Received: from unknown (HELO mail-vs1-f53.google.com) (209.85.217.53) by pb1.pair.com with SMTP; 29 Apr 2019 10:31:39 -0000 Received: by mail-vs1-f53.google.com with SMTP id g127so5333490vsd.6 for ; Mon, 29 Apr 2019 00:33:29 -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=ZQaVBOydIbH8Sd5xfyIhZR9VBYOEvpNZF02cMdZr7To=; b=oeL+wgxYOVPJmN7AhQbFdN+gYEJirkQCnvVNrSG2/F9G7TFs7GcqwzyM/b634sCOE4 9mn+4JleZO07/mtzsL2EG5TESUzUmsvj3npY7m+2wL/SCgnKsnFPj7X+BegHTp9vR21n qiFyg22vLg+c0ny4xcdVPjarERltoof01RwHzPFZuZbRcs8Pw3xECVPrv9gZWvLxXo2X gLarwaL3115WTRV3FxMA1GYhtoARXrqu+fCXPBG4xe8Bwhk1nipibcmxSCfJPsxJSh76 eEGtwfyJgHYPegk5nDlj7PaJT+11Xagdo+s8A9pxg248tVhIWFswZa7zI+WBTyul939D QVgA== X-Gm-Message-State: APjAAAUL6Jvqrbkaqk4PAv+6W0amVBl5BoTK6KuIe4myRcHdXQZd22/m RMkzuRAMTSp67+HYOOrlNr/4VLhBzyLOuUryOC0= X-Google-Smtp-Source: APXvYqxzcLyFplRvRTF2Yi5sFTL7//rYnbZsUyT+32K8ELaAWmVV4ZBm50tCfVtcum0q/3f8tjIRWJin3t0wDskuFXc= X-Received: by 2002:a67:6945:: with SMTP id e66mr361314vsc.44.1556523208955; Mon, 29 Apr 2019 00:33:28 -0700 (PDT) MIME-Version: 1.0 References: <9a90b882-b6d5-a36c-20db-318c79cf5028@gmail.com> In-Reply-To: Reply-To: bishop@php.net Date: Mon, 29 Apr 2019 03:33:03 -0400 Message-ID: To: Theodore Brown Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000f45cc70587a64ca6" Subject: Re: [PHP-DEV] Revive Number Format Separator RFC From: bishop@php.net (Bishop Bettini) --000000000000f45cc70587a64ca6 Content-Type: text/plain; charset="UTF-8" On Sun, Apr 28, 2019 at 1:47 PM Theodore Brown wrote: > On Sat, Apr 27, 2019 at 10:25 PM Stanislav Malyshev > wrote: > > > I am not exactly against this feature, but the potential for abuse > > \- like enabling people using integers for things that are not > > integers and should not be stored as integers - worries me now. > > Based on the usage analysis Bishop did, people already use integers > for number-like values (e.g. phone and social security numbers) that > can be better represented in other ways. > > Perhaps adding the numeric separator feature can actually be an > opportunity to discourage such misuse. We can add a paragraph to the > RFC (and the documentation if it is accepted) that lists examples of > usage that should be avoided. > > Ultimately there remains many legitimate uses of large numbers in > code (e.g. scientific constants, unit test values, business logic > thresholds, etc.), and this feature is a simple way to improve their > readability. > > I've lost count of the number of times I've been debugging a failing > test and struggling to count the number and position of digits to > make sure I have the right value. This feature would save time when > reading code and indeed prevent a lot of mistakes in the first place. > Well said. One need not agree with an implementation to appreciate the improved readability. If you'd like to re-open this for voting, I'm able to assist with the RFC process and any code changes. --000000000000f45cc70587a64ca6--