Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118780 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27995 invoked from network); 7 Oct 2022 15:45:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Oct 2022 15:45:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2BE3C1804C4 for ; Fri, 7 Oct 2022 08:44:59 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (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:44:58 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6173032008FA for ; Fri, 7 Oct 2022 11:44:57 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Fri, 07 Oct 2022 11:44:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1665157496; x= 1665243896; bh=56hbKhQszp/khZyv2aOeLj+Jx7Z6FvuVkEEr2+7OsVo=; b=2 27x1hFwe9ChTb52Eo2NWdjaSMVT+9eer2+v1vfhqhpFMsBUxbnJqlCc+v4iKM0r7 /qHv12QqZDrx+XhXS6N9xPtWDdCEWzmXaM/V8VkxUci1hA04M7vHBt/RfXHjBFvL gGa2dFbDK4WRbhRwvQn1wiCTiPE0SBjH5AW5Tffm+/ifV5mX25l+YkHK05zY+mxl iymR2WcQE66lqqy7VqO3pTrZSgEMFifUBVYDwfiJCUzS93VSFvDpRfD6ATaZdTv3 yy82puz13/SS3w2DS1eONz9E7OLK3+na1c/ElzR/0v7Y9bmYvmfyDUBMZwytIjRV z5ShCsq7EjAWaO8SQTcJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1665157496; x=1665243896; bh=56hbKhQszp/khZyv2aOeLj+Jx7Z6 FvuVkEEr2+7OsVo=; b=VM0Jqh3aGx/gIibcFu1R7NN9tIqyOIl/XEmxbKiE9Gm9 8MseHh0C65ThefpJ+zGjROcOyPubGkZyaEhmUMRQ/3esVzAd92Dws2LYUtzzK/5f aWGoxA4edLB3w4GrZrBekFIRNIvuCn4jBNsWxaQvRCP7l+GBeAYC26I1fzbPpyBj 8F2pOYIm+vnr/9llkK1NqChg1DVqpJY3Sht+jlBjiBtJh9agPzsLDw66SHtrOd8s vBCcppsgTX9aSTMj2aua6N5nA47PV3pwErYg+wkwelBo4rR5vg2lYOGz/w2Rt961 rKAvKVFqqZYpO1+DwpEdgxAgqc1jRWuj1ccaIKDfNQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeijedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeejieejudevfffgledvjefhgfehieevveetkeeitdev leelgfehvdfhgeeihfelfeenucffohhmrghinhepghhithhhuhgsrdgtohhmpddttddttd dqlhgrnhhguhgrghgvqdgvvhholhhuthhiohhnrdhmugenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvg gthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D12101700083; Fri, 7 Oct 2022 11:44:56 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1015-gaf7d526680-fm-20220929.001-gaf7d5266 Mime-Version: 1.0 Message-ID: <2cca6ce9-409a-4af3-b947-c47b0d689b48@app.fastmail.com> In-Reply-To: References: <1aa20877-3365-0ace-25d2-1cb1be8f3bcc@gmail.com> <55686BD4-4C67-4A4F-8BE4-BDF0149296FB@gmail.com> <95467744-C4FC-45F9-9A5B-E3A8B9790074@cschneid.com> Date: Fri, 07 Oct 2022 10:44:36 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Experimental features From: larry@garfieldtech.com ("Larry Garfield") On Fri, Oct 7, 2022, at 5:58 AM, G. P. B. wrote: > On Fri, 7 Oct 2022 at 07:57, Christian Schneider > wrote: > >> But now to my main point: You are talking about the most simple and >> isolated case, a new function. >> > > I agree, and for most intent and purposes a function can be polyfilled in > userland. So this is the least interesting case. > > 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. > > >> 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. >> >> All in all I'm not sold yet that the benefit outweighs the cost of this >> approach. >> > > Ditto. > > When Nikita proposes editions back in 2020 ( > https://github.com/nikic/php-rfcs/blob/language-evolution/rfcs/0000-language-evolution.md) > the point about them was mainly about backwards-incompatible changes, > 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 > thinking > about the design of it instead of just shoving something in php-src > randomly as in the before days. > > Best regards, > > George P. Banyard 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. 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. Some candidates to consider could be: 1. Named args 2. PIpes 3. PFA 4. Intersection types 5. Enums 6. JIT 7. FFI Personally I'm still highly skeptical that this would be useful, or useful enough to justify the engine complexity. 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. We should learn from that experience. --Larry Garfield