Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118800 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16470 invoked from network); 11 Oct 2022 20:26:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Oct 2022 20:26:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 062CE1804F8 for ; Tue, 11 Oct 2022 13:26:09 -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=-0.2 required=5.0 tests=BAYES_40,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, 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-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 ; Tue, 11 Oct 2022 13:26:08 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id bu25so22867109lfb.3 for ; Tue, 11 Oct 2022 13:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qXqj54rFoZgyYGEBk7vTTZlUjT1AwkGt2elpH8qjtUo=; b=l7T5jTJfThQRBHQSJ0VkEFjqrJayduDVWnYsaR6fxVE9NWmYnEhazA2kM6t12IzWEY GPqU4rM6UKydlri9+GJQn2ndkl8/8s0OgAnfsDyN9BnrULDLvjYaX9sOUDd1u2OLRtuK ZncoLPGsBWdbM7b0/X6YLik6TolhUC9vT55aXGugCXq7cDDyrwk5ua/w3a65zwFH2Ehw 0g34/hvS3NJuAowH/uZhtmm6JuqYQZSA1A4ckuEkJnBUq/l6TdxV/uFkgVqi9lp+OPvv dZSYvnIZV/Bp0yNtdLQSWzYBof8rWltmuJC9gbnjzEmVlhmTNtHRaqgUOB0ewTBDu//3 h2Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qXqj54rFoZgyYGEBk7vTTZlUjT1AwkGt2elpH8qjtUo=; b=tRXdVTa+kXQwQEGAbL5XXMdpdvYpi9oOzbycn529NyLulBxRnLUW8v9xcLUySEX5CV 16ZUyMX3vOX+RhWmpvl51jRL7lWjxAtrBWdYkuudwpA9r7LsarwwhEWybIEkZQCXRiT3 r3cXgN8F9EfhERC1fA223p55kVSeSzvHL0WMI50n5q/31H75jpO9XCe14fQNoXL2X/c2 86uWIXq9P3jnJVwneGICmmhbMYQfnDKk4kJ8JBjmc88kfHBN3ZD06w0sJAg5W4z6SEve CGEF0sFHS+dKXd8GEa6sQ3qsO75J5eWPoxUaMf3h3FdS5PTrDpabwUWafU9H++bvU3YR TAsQ== X-Gm-Message-State: ACrzQf1sSTFa/stXPgxJic0N0yYFRZ/EMwui9CZqxVCEq67uJjtZEfb3 lQnCBJiWM6VBQAYO7deiUj8wtMCVlOs47Mg5L/mHWCnxH24= X-Google-Smtp-Source: AMsMyM7drBHegrZC5NWgTFo1lyn3wzj1pFbSQg1RPpVhMpWL9k8fFiGm6mvTI5pOOORRmMXkKzwQPYH8ed0yr9gJg1A= X-Received: by 2002:ac2:551c:0:b0:4a2:3c32:aff5 with SMTP id j28-20020ac2551c000000b004a23c32aff5mr10034054lfk.31.1665519966047; Tue, 11 Oct 2022 13:26:06 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 11 Oct 2022 17:25:54 -0300 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="000000000000f155c505eac81556" Subject: Feature preview (formely was: experimental features) From: david.proweb@gmail.com (David Rodrigues) --000000000000f155c505eac81556 Content-Type: text/plain; charset="UTF-8" In order to try to organize a little better the original purpose of the discussion I started, I decided to "rename" this subject to something closer to the purpose. From "experimental features" to "feature preview". Original thread: https://marc.info/?l=php-internals&m=166491585711553 These are my suggestions, as per the discussion that took place during the original thread. (A) What are preview features: (A1) There are features ALREADY 100% APPROVED through the voting system among the PHP team and that can already be implemented in the language in a preview format (via PR), available to the general public through minor/patch releases through "preview" markers. (A2) These are features that are understood to be effective for the language and that will be available in a future major (eg. 9.0) or minor release (eg. 8.2). That is, it is not intended to be removed "at any time". (B) What are NOT preview features: (B1) Suggested features, even if well accepted during discussions, but not passed the voting process as approved, even if a PR is already available. (B2) Experimental features (literal), whose idea would be to test "in practice" its functionality before deciding if it will be part of the language or not. (B3) Features that may have a high risk of rejection due to performance, security or usability issues, even if they were approved during voting. That is: when in doubt, even if approved, keep it as exclusive to the next release. (B4) New features approved but with pending discussion should not be previewable. For example: json_validate() is approved, but the function name is under discussion whether is_json_valid() or json_validate() is better. In this case, it prefers to keep it out of the preview until that is decided. (C) What changes in the voting process: (C1) An additional voting topic to decide whether a new feature can be previewed or not (i.e. basically deciding whether the feature is safe to test ahead of time, taking security primarily into account). (C2) Additionally, decide what the target version of PHP will be (eg. PHP 8.2? 8.3? 9.0?). This helps more complex features get more preview and feedback time. (D) Advantages: (D1) New features will be able to be tested before an official release (eg. 8.2), and all issues can be resolved before this release. (D2) During the voting process, a feature can be developed for the next version (eg. 8.2) or postponed to the next-next version (eg. 8.3), if it encounters difficulties, without freezing/delaying the release of version 8.2, for example. (D3) Regular users will be able to test features in preview, without installing nothing (eg. PECL), since they will be available natively in PHP. Of course, with the notion of the impacts such features can have (like needing to use markers, minimal performance issues). It is important that the documentation makes it clear that a particular feature is under development in preview mode. (D4) The development team will have early feedback on these features, and will be able to work on fixes with more "peace of mind" and security, since there will be no obligation to release a patch that quickly (except for security issues). (E) Disadvantages: (E1) The development team will have to pay attention to early feedback for a feature still in preview. However, this is something that would happen after the final version anyway. In practice, I imagine the time used would be equivalent. (E2) Once the final version is released, the language would have to accept some markers temporarily and deprecate-notice them until it is sure that users have migrated to the final version. Probably these markers should be permanently removed at the next major or major+1. (E3) Users using preview features should be responsible for updating the code as soon as the final version becomes available. (F) Final considerations: (F1) Preview features need markers, either in the function (eg. preview_json_validate() or maybe Preview\json_validate()), in new classes (eg. Preview\XYZ::method()), in new methods (eg. XYZ::preview_method()) or, if affect the language itself, in declarations (eg. declare(preview_xyz = 1)). (F2) Preview features can only be removed when there is a serious security risk to the language that is irreparable. By way of comparison, removing a preview feature is like, after releasing PHP 8.2, dropping support for "readonly" as class modifier. That is, it is understood that it must be thought of as something unfeasible and impossible to happen. (F3) Preview features can be started in PHP 8.1, for example, and made final in PHP 8.2, 8.3, 8.4 or 9.0, and so on, as long as this is decided during the vote. (F4) We can try a single preview feature. Instead of thinking that "features in preview" should become a default for PHP now, in a definitive way, we can opt for a new feature approved in PHP 8.3 (currently I don't think there is any approved, but eventually we will), for example, and make it available in PHP 8.2 as preview. So we test in practice whether the idea itself will work or not (and even user adherence, with open source projects and feedback). And if all goes well, we can make it default for PHP to offer this kind of support. If something goes wrong, we can let this idea go. (F5) Preview features should generally be released in patch versions (eg. PHP 8.1.12 to preview a PHP 8.2 feature). Atenciosamente, David Rodrigues --000000000000f155c505eac81556--