Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118782 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30999 invoked from network); 7 Oct 2022 15:59:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Oct 2022 15:59:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DAC7F1804FF for ; Fri, 7 Oct 2022 08:58:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 7 Oct 2022 08:58:58 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id bu25so7939614lfb.3 for ; Fri, 07 Oct 2022 08:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RBB6E1boxhY7+/KF0F8UisIltWYWgTi59a0Asjmaq64=; b=UBHJUKvIjL7jXobPi2diN/UWr+GunorbRkAQcffyRjJ7VO/YpP/gLdZngy0PfRO3L6 xD6DzAQzxRLbCy79LVTlLlfmV407dfXFqkeQaokznxWtbKU9mbRYJMKGKaMAfUUaTHcp M6SD/gLxMRDMusvZkbpxVbFIRD/j89k98aHN/51wsM6jVZcm5HNEhYehMqXqBIOsYBbX r9+wmIEWk+Fedz5pmJU2jRMGv0sEQoKCU5nSydy0Ge2NFq2Gw1QvxS5hwhU5rZcv53P1 /66OrqCEHKIl4KlKkNMBXGe2vRfLCgN/MUYXPAjYGM4eqZC3s9Q2Ap/9W0c/eTWJbEmJ u9NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RBB6E1boxhY7+/KF0F8UisIltWYWgTi59a0Asjmaq64=; b=paAj7Fbaq1pazJuhchKEVFO0VTjrXlVR4FlQ+yqeIilCePYnSK5zjcNaj1fgDts8O7 Maic1DQ7B5l2icr6twCDB5FBfxbAIx4+Gvlqa5hSAil4IS8ZwWCOHoAhIqjhKFWLXbW6 CVUkncJqbyw+quNzRiNp9yz1P6yWyyNObVzx43sHMxG4AIMXAxNCEbnY9Tjv+UVPovIA 3RFY50nGf+US9dXkDR5Z31EwupcjnPLdq2YNRgiOwnY630ndmeN4J13McKlG9/tBk0ky dubqszFFfV5+YSCnyYzUsU+/wGianBpd7RLIl5Hb5grz1NxxoUtSVkprGh8MLO8KUc1l EC/Q== X-Gm-Message-State: ACrzQf2Mdw42JK2D8aHtdTnMVTRzRLTB5NWW0l/WPDX7B4c+h05m6kQX 8T1j5HAkKA3r+9NZoYGLKOOW0RhFLd0= X-Google-Smtp-Source: AMsMyM43lJqTCCiKysUA7ezMfMegcN1j5nD5khTk9xKbrxfAuy6yQsYWmSLxoKnwHdicjhWjKFuRcA== X-Received: by 2002:a05:6512:a91:b0:4a2:7f24:9a29 with SMTP id m17-20020a0565120a9100b004a27f249a29mr1974316lfu.182.1665158336541; Fri, 07 Oct 2022 08:58:56 -0700 (PDT) Received: from smtpclient.apple ([213.109.238.56]) by smtp.gmail.com with ESMTPSA id y7-20020a2e5447000000b0025fe7f33bc4sm319447ljd.49.2022.10.07.08.58.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Oct 2022 08:58:56 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) In-Reply-To: <2cca6ce9-409a-4af3-b947-c47b0d689b48@app.fastmail.com> Date: Fri, 7 Oct 2022 18:58:54 +0300 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <1aa20877-3365-0ace-25d2-1cb1be8f3bcc@gmail.com> <55686BD4-4C67-4A4F-8BE4-BDF0149296FB@gmail.com> <95467744-C4FC-45F9-9A5B-E3A8B9790074@cschneid.com> <2cca6ce9-409a-4af3-b947-c47b0d689b48@app.fastmail.com> To: Larry Garfield X-Mailer: Apple Mail (2.3696.120.41.1.1) Subject: Re: [PHP-DEV] Experimental features From: autaut03@gmail.com (Alex Wells) > On 7 Oct 2022, at 18:44, Larry Garfield = wrote: >=20 > On Fri, Oct 7, 2022, at 5:58 AM, G. P. B. wrote: >> On Fri, 7 Oct 2022 at 07:57, Christian Schneider = >> wrote: >>=20 >>> But now to my main point: You are talking about the most simple and >>> isolated case, a new function. >>>=20 >>=20 >> I agree, and for most intent and purposes a function can be = polyfilled in >> userland. So this is the least interesting case. >>=20 >> However, I don't think this approach is that useful. To give an = example, >> for DNF types the implementation is based on a change in how iterable = works >> in PHP. >> It went from a pseudo-type to a compile time alias, as this massively >> simplified variance and LSP checks. >> I would not want such a change to land in a patch release especially = as it >> turned out there was an unintended BC break with the compile time >> redundancy which only got fixed in PHP8.2RC2. >>=20 >>=20 >>> Your model may work fine with that but as soon as we are talking = something >>> like a syntax change we have some additional problems: >>> - Enabling it with a prefix obviously does not work, something like >>> declare() is definitely needed >>> - Maintaining such changes to the engine / parser could turn out = messy, >>> e.g. lots of "if (experimental_x)"-like code in the core >>> - The test suite would possibly have to deal with an exponential = explosion >>> of experimental feature combinations to make sure they don't = interfere with >>> each other. >>>=20 >>> All in all I'm not sold yet that the benefit outweighs the cost of = this >>> approach. >>>=20 >>=20 >> Ditto. >>=20 >> When Nikita proposes editions back in 2020 ( >> = https://github.com/nikic/php-rfcs/blob/language-evolution/rfcs/0000-langua= ge-evolution.md) >> the point about them was mainly about backwards-incompatible changes,=20= >> not >> new features. >> Because in general new features don't have the same issues, = especially >> since the RFC process (although not without its issues) does force=20 >> thinking >> about the design of it instead of just shoving something in php-src >> randomly as in the before days. >>=20 >> Best regards, >>=20 >> George P. Banyard >=20 > I think what would be useful here to better understand the value, if = any, would be to look back at some recent RFCs, both those that passed = and those that didn't, and imagine how they would have gone had there = been an "experimental" flag option for them. >=20 > Would they have been marked experimental at all? Why? > What might have changed and when while in experimental phase? > When would they have been removed instead of being adjusted? > Etc. >=20 > Some candidates to consider could be: >=20 > 1. Named args > 2. PIpes > 3. PFA > 4. Intersection types > 5. Enums > 6. JIT > 7. FFI >=20 > Personally I'm still highly skeptical that this would be useful, or = useful enough to justify the engine complexity. =20 >=20 > Bear in mind that browsers had "experimental" CSS features for a = while, and eventually abandoned prefixing as it was an absolute mess as = the experimental features ended up in production and then had to be = supported forever in that early, broken form. Instead, they switched to = an opt-in flag in browser configuration (~php.ini setting) on the = assumption that devs could play with it, but *it was completely = impractical to ship to production* so no one did, so they could still = change it. Experimental features never leave the dev's own computer = until they are no longer experimental. That has worked out a lot = better. >=20 > We should learn from that experience. >=20 > --Larry Garfield >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >=20 I don't think it's valid to compare browser (client side) and PHP = (server side): browser versions and support is not controlled by the = server, so it's not fair to expect client-side experimental features to = perform as good as server-side ones. If there's anyone to learn from, it = should be Kotlin or other server languages.=