Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116334 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61386 invoked from network); 12 Nov 2021 18:05:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Nov 2021 18:05:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1BEC41804C4 for ; Fri, 12 Nov 2021 10:59:59 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 12 Nov 2021 10:59:55 -0800 (PST) Received: by mail-lj1-f171.google.com with SMTP id d11so20348531ljg.8 for ; Fri, 12 Nov 2021 10:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nrcHV7kVGLiYPMHvyozQ9h/e//8lFS3JJoMKCcIlE5g=; b=ncS6TdzIH+shN66MVBvGbDdh0pxAKA0g2FPa7ibp+Qiu6KRRpsbw3H/12z9izFQGUP uwQHmdXvaH73M0JjM3VuIuWmUT4MCGNtIWTjgYtz8901hpCvt3ijgQraU6CSLWT4i3SQ aqbIh6Hhb4GjFuz+ddRnNcObXAUpYVdjyHpLSDKbfHoIIj++TSvKWXx3zgAov+VKbNb+ iI+sNwCmGFwFCQRIoayxIlRTv61aSWp2cssaodOuPOvTUwgxPCbzJKKD4iTtasibUpoM MBFDPL2uSQb5LuwYPpM4dKX/sUxLEb7fkn80ed0bGjw5hYIyYNMriml8ldGIhlW/Bp4s fJxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nrcHV7kVGLiYPMHvyozQ9h/e//8lFS3JJoMKCcIlE5g=; b=T/nUNoiyMbYnf1zqeHZpuxdcBEnDC+Bh5tJzct1PxNy6E019xX7CXCYChzy4cI8CIl qk0R48aTXU0ekxOuoYmUjZsCwYKF4Zr3p6l73xOCt40n3al4dVIPn+6raUarMphFqMwC eopoFS8cigMfcbfF44y/2vT2CD8EgH9bY5Y5e5dCR7M54XbDyjuXwGaSkxk8DCLmwFgy kUcOdLfeXYlnLet5c23TEKu/DsEAh1YdPTcKCupWLMplh3jfauHnBdXDtslhbFwJj4b0 5QFXxGVyzGsHrklcKyAjPIVtgBoJHBLNK9Th0sWvbx3lWEnW7l1frBo9lFqt/zf6QhC+ 6jbw== X-Gm-Message-State: AOAM532tmind19BwmYy/3Ffv2GKGrTzIblVo4hjOXGkAfff9/ulyLCGP tnFhh3sT11g9iVSRZn3mA4YY2a5oO7TJwfNOySXaZzAa9uo= X-Google-Smtp-Source: ABdhPJyrSxvg/2WAlETRlg9hrk464WrlWLcqOUfRfYl/XMRatjAgH6A5oEaAvxTH00lLMuouSIHCT3mz7Q+bV2AYqLY= X-Received: by 2002:a05:651c:504:: with SMTP id o4mr12022238ljp.242.1636743593678; Fri, 12 Nov 2021 10:59:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 12 Nov 2021 12:59:42 -0600 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000007d5ab105d09c1002" Subject: Re: [PHP-DEV] [VOTE] Deprecate dynamic properties From: mweierophinney@gmail.com ("Matthew Weier O'Phinney") --0000000000007d5ab105d09c1002 Content-Type: text/plain; charset="UTF-8" I recognize it's a bit late to be commenting, now that voting has started... but this feels like a solution for which we already have workable solutions, and which will instead lead to a lot of misunderstanding and breakage in the user ecosystem. Our IDEs, coding standards, and static analysis tools can already flag these things for us, helping us catch them early. Hell, unit testing will find these for us, when a test fails due to a value not being set in a property that we expected. Making this fundamental change to the language means, however, that a lot of things that we were previously able to do that "just worked" now raise a deprecation notice, and, later, a compilation error... unless we make a change to our already working, fully functional code. I think the Locked Classes approach made far more sense here, because it didn't require changes to _working_ code. By making the behavior opt-in, developers get to choose if that's what they want for their classes, instead of having a backwards breaking change thrust on them. (Perhaps an even better solution would be a declaration, like we have for strict_types, which we could do per file.) Or maybe I'm missing something else: was there something at the engine level that was driving this, a significant performance gain we get from changing the behavior? Because if there was, there was no discussion of it. In fact, the only discussion of "why" in the RFC is "In modern code, this is rarely done intentionally". Why is that justification for changing the behavior? Can you quantify how much code would be affected by this change? and how much would benefit? Yes, I know that code I write would benefit from it, and personally I'd love to have a way to opt-in to something more strict - but I think a switch like this is going to make upgrading to version 9 difficult if not impossible for a huge number of PHP users. Sweeping changes like this need data behind them. If there's such data for this RFC, it's not present in the proposal, and as such, I cannot understand what drives it. On Fri, Nov 12, 2021 at 7:08 AM Nikita Popov wrote: > Hi internals, > > I've opened the vote on > https://wiki.php.net/rfc/deprecate_dynamic_properties. Voting will close > 2021-11-26. > > Regards, > Nikita > -- Matthew Weier O'Phinney mweierophinney@gmail.com https://mwop.net/ he/him --0000000000007d5ab105d09c1002--