Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118776 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 9481 invoked from network); 7 Oct 2022 10:58:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Oct 2022 10:58:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1C9F81804BC for ; Fri, 7 Oct 2022 03:58:20 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 03:58:19 -0700 (PDT) Received: by mail-pg1-f180.google.com with SMTP id q9so4338811pgq.8 for ; Fri, 07 Oct 2022 03:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0+gotZggUYTSKTX39eOfSJz04TxMfetU+rpQ+y55imQ=; b=Gp8C1lBOp9Fmz9Mz1atcJpPa+czlNDnFQ9ows6eadmwg4xNPFxKApt/mb3MQQAqUHq MY0wLdeJ+hXpAWJDa9Z5W+FUrSUi7jXsSJigKclwKi0V5UVit2PWl48pKEfjx/dw1qdW gvs3EkdlKk7W7eRsbJrLlQvmuYC9DEm3YqPQOLhsDPBIJcxQw59xWgrxBvpVJcEZwGga qQeNlJEq66UY6OJOupAjoysvWFletd914HnmMbBdtLW1Lq+tJdL0IWBfdj+CstN0awNr 3U/AQURuJdDJ5NfMbL5aotaM7hfvG0IdLCiiRTfUymL1YzIBmW61jroLQ0eYUgJYYihr eIjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0+gotZggUYTSKTX39eOfSJz04TxMfetU+rpQ+y55imQ=; b=c2KZvN10sLPMvV393O6XxAUjUz55qtxFTk4YSm5ICOyHEV5+3jPdE1TQquMN/b97Bi lIPensvjMoHzSkDZy9uTEBUpNHSSoJE0UmywxbHCFamhGnJQE7ZakID77J1+/gR5zs+5 FYSE3pNrx1mZWpnWu3PyY9P+4cruNiKheXSsYsAv7YHv7EfTeaKSg2JBZbdW47qfhHlT EEn2v2qONwxL8a1nMRolcqgK/dXWFaWuXi5C1GEx24Spl+ffvW5hu7LEhGRaJJhQ70+A KKKe0Meaej9mm8HZxp+1xmEvGTq64V98bde9MFwEYKp/4RHxRZeEa9WJBuVUFgbJQtrs ydJg== X-Gm-Message-State: ACrzQf2fAndGeWyD5XkOVGm5aHYpZOjISV6hLe09DEKes/3RRpU6865g 2XRzZ2jOvWnaoi1ZVgCr3xr18YquR2OPaxpY20vuFMSMnlEVXQ== X-Google-Smtp-Source: AMsMyM53aFe63mBuhn8H2+bJI90IvrinAwU/xXMEElGY9xCAFFVnNdqc+gOB7j3AJmrS/XwSo3XxCcktbuoQdR6EiZY= X-Received: by 2002:a05:6a00:35c6:b0:561:ff65:6a2c with SMTP id dc6-20020a056a0035c600b00561ff656a2cmr4598206pfb.55.1665140298608; Fri, 07 Oct 2022 03:58:18 -0700 (PDT) MIME-Version: 1.0 References: <1aa20877-3365-0ace-25d2-1cb1be8f3bcc@gmail.com> <55686BD4-4C67-4A4F-8BE4-BDF0149296FB@gmail.com> <95467744-C4FC-45F9-9A5B-E3A8B9790074@cschneid.com> In-Reply-To: <95467744-C4FC-45F9-9A5B-E3A8B9790074@cschneid.com> Date: Fri, 7 Oct 2022 11:58:07 +0100 Message-ID: To: Christian Schneider Cc: PHP Internals Content-Type: multipart/alternative; boundary="000000000000fff54e05ea6faf41" Subject: Re: [PHP-DEV] Experimental features From: george.banyard@gmail.com ("G. P. B.") --000000000000fff54e05ea6faf41 Content-Type: text/plain; charset="UTF-8" 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 --000000000000fff54e05ea6faf41--