Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118775 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96977 invoked from network); 7 Oct 2022 06:57:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Oct 2022 06:57:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 635B11804C4 for ; Thu, 6 Oct 2022 23:57:29 -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,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15623 212.45.192.0/19 X-Spam-Virus: No X-Envelope-From: Received: from mail.gna.ch (mail.gna.ch [212.45.196.109]) (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 ; Thu, 6 Oct 2022 23:57:28 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id CC6773A1D85 for ; Fri, 7 Oct 2022 08:57:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at example.com Received: from mail.gna.ch ([127.0.0.1]) by localhost (darkcity.gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xE5JyblZvOj5 for ; Fri, 7 Oct 2022 08:57:26 +0200 (CEST) Received: from smtpclient.apple (unknown [IPv6:2a02:1210:2ea4:cf00:dd4:2aae:be9b:2da2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 56B0C3A1D83 for ; Fri, 7 Oct 2022 08:57:26 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Date: Fri, 7 Oct 2022 08:57:26 +0200 References: <1aa20877-3365-0ace-25d2-1cb1be8f3bcc@gmail.com> <55686BD4-4C67-4A4F-8BE4-BDF0149296FB@gmail.com> To: PHP Internals In-Reply-To: Message-ID: <95467744-C4FC-45F9-9A5B-E3A8B9790074@cschneid.com> X-Mailer: Apple Mail (2.3696.120.41.1.1) Subject: Re: [PHP-DEV] Experimental features From: cschneid@cschneid.com (Christian Schneider) Am 06.10.2022 um 23:40 schrieb David Rodrigues : > But keep in mind that these features are already intended for PHP, and = it > is not a "feature test" or suggestion. The voting process is mandatory = and > the feature must already be set to "accepted". Just so I understand what you are saying: You would only add things to = experimental where an RFC for it has been accepted? What you basically want to do is to introduce such features into the = current stable branch instead of the upcoming one, right? > However, we need to separate an experimental feature into stages, much = like > Node does, so these are my suggestions: [...] > 2. Open experimental: the feature has already been state internally by > "adventurous users" and can already be used without php.ini = configurations, > however, its use in code still needs experimental markers (eg. > experimental_json_validate() or declare(experimental_*)). BC is = unlikely to > happen unless the feature has issues that need to be resolved before = an > official release. Removing the feature is suggested not to happen, = with the > exception of very serious and irreparable issues. One side-note here: I would strongly advise not to use an experimental_ = prefix or package for functions because it would be a PITA to make code = compatible with different versions, one where the function has the = experimental_ prefix / package and one where it doesn't. But now to my main point: You are talking about the most simple and = isolated case, a new function. 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. Regards, - Chris