Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118755 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53844 invoked from network); 5 Oct 2022 17:07:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Oct 2022 17:07:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3F3BC180503 for ; Wed, 5 Oct 2022 10:07:12 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, MISSING_HEADERS,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-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 ; Wed, 5 Oct 2022 10:07:11 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id o7so19181243lfk.7 for ; Wed, 05 Oct 2022 10:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=NYPrAAGGGsNpxFQ4lW14zNJR+MxwyrgD0boMvvG2C64=; b=ajHPKA/xjS0dgSPZbgsmDsKg1BgPGXDovGt77Fu6HNRgWi0QjxDmsdQw3b0Sd3QSrn EZ3WySi8QiXyPA87NqP9SqH1x9wFDWV8HwhTFUeoxx9N/HNWoDnfhAgBzE9DEdWmOnrk QTNACzFwTdrk0QFjLEKrpePjkycYDtuwK3ngvABUxPj+nHqTPu2TmV8Mz98bVxnCOAV9 s2iyNSlpxKTA0NPTlksKpbjCs/bijvdFsiy9CXYIvHoSMXIAqtmU0Gg5Vwz9bpFo20/u G0SOuQzsAPj/b0qLbJ4joEiAtRZqwWUhbO+9olkuF06QWpnydN+xzAAlq9S2kgD9I2kb TPQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=NYPrAAGGGsNpxFQ4lW14zNJR+MxwyrgD0boMvvG2C64=; b=1CDi4EgQ1eRQIv7m89W5UJI2ygpvCcn1MYNSg6SXLjhICmZWJTy9e2I7kX1iUjmmmc ofT/yKnBGGHZV/si/Ifn7xxLe3+bqs8Nb7/+x53DKpxOvpEFgZZNtt7jzukK2GT2yhZ+ /+Vk2CZ5MunjNQvku45FVEg03LqKJ0Ue1N4pyV3gjpGFCNVXEnhWHPLTKVtAOKUrD+E0 /WlcuLo1alzL/XSjl6uxJdw3/yE7BZvzIjsh4/WEtuwCcqnd3bIxYSF86DJST086wg9E qbC0OjW6EGR40o6L7ns/YM2Zl7H+JUtT4oNR5Tv4dDoDFDXSoAKrC0OjYUf5ZjsWGbra c/yA== X-Gm-Message-State: ACrzQf1s9xw6bP3uWeAcO7EdBEAiJknNNyyjecDfZbkKior6r/EAHish 9Hn8fBJdTkVrMhf/M+q+ditdBRQ3nuZtYON91DyYZTA47Vk= X-Google-Smtp-Source: AMsMyM7ZZ37JtKMDpR0z0tjM/gSrmKZOICfzViQUw4GF2nZtgr0ubAVrugso1ggzi2LyAdYQoscj3uwly6xJvBHIwrM= X-Received: by 2002:ac2:58e2:0:b0:4a2:3ec2:63a0 with SMTP id v2-20020ac258e2000000b004a23ec263a0mr272371lfo.174.1664989629733; Wed, 05 Oct 2022 10:07:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 5 Oct 2022 14:06:58 -0300 Message-ID: Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000006f5fc705ea4c9b3f" Subject: Re: [PHP-DEV] Experimental features From: david.proweb@gmail.com (David Rodrigues) --0000000000006f5fc705ea4c9b3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you all for participating in this discussion! Regarding the experimental features "disappearing" in a release, therefore, its use is not reliable, in reality the idea is that this is the exception of the exception (when, for example, the feature itself proves to be extremely unfeasible for performance or generating irreparable security flaws). It is not something as if every new idea becomes an experimental feature, but rather, ideas that already had a good technical discussion and the doubt was in the practical application itself, but with a great intention of turning it native in the language, however, making it available before time for refinement and common usage. Regarding the code development, following the previous statement, the idea is that the core developers work on these modifications as well, since the idea of experimental features is for the code to become a native part of PHP. It's different from extensions, where the discussion is on the way to rejection and the developer who suggested it intends to do something practical aside, and eventually the PHP team decides to make it native (but that's another discussion, and I believe it's already possible at the moment, at least part of the idea). A more practical example is the following: In the PHP RFC we have several proposals already accepted, often before the vote, we already have a good idea of their acceptance. But let's pay attention to only those votes that have already been approved. Normally these features are only applied in the next version, PHP 8.2, however, when it is released, it may lack some refinements in this sense. Let's take, for example, the RFC "allow null and false as stand-alone types". This feature was voted and passed unanimously on 2022-03-27, but PHP 8.2 is due for 2022-11-24 (as far as I know -- aka Google tells me). However, it is a feature already developed and could very well be available on an experimental basis, so we have time to test it on smaller or personal projects, for example, until PHP 8.2 is available where this functionality will be 100% refined and ready to use. declare (experimental_allow_null_false_standalone_type =3D 1); Another advantage in this sense is that it would be possible to have a single development branch for PHP 8.1 (current version) and 8.2 (development version), for example, with the difference of some definitions in the code that activate or deactivate the experimental features already developed for the future version. So a new intended feature can be developed in 8.1 code and marked as experimental (and common users will be able to try them out, using them in an experimentally explicit way), and when you start preparing for the 8.2 release, those definitions become final. Another advantage is that a new feature can be "delayed" to a future-future version (eg. 8.3) if it is believed not to be refined enough for the next version's release. All I want to say is: I would love to be able to use new PHP features ahead of time in personal projects, without having to wait for new versions to be released (and in the meantime, I would be able to give feedback). Just as I'm willing to take the risk of failure, after all, these are experimental features and shouldn't be used in production (unless you're willing to take risks). The difference between using the in-development version of PHP 8.2 is that many servers only make this version officially available after a few months, while smaller versions of PHP usually become available within a few days. Atenciosamente, David Rodrigues Em qua., 5 de out. de 2022 =C3=A0s 13:02, Christian Schneider < cschneid@cschneid.com> escreveu: > Am 05.10.2022 um 15:38 schrieb Alex Wells : > > Advantages of experimental features over extensions: > > - they allow changes to the parser > > - they are universally supported (by IDE's, parsers etc) because they a= re > > part of a stable language release, not an unpopular/unknown extension > > - usages of them can be found in a codebase and then analysed (unlike > > extensions that don't have any kind of marker to denote them from regul= ar > > code) > > - it's easy to implement a universal warning mechanism - for IDEs, stat= ic > > analysers and PHP itself to warn users about the consequences of using = an > > experimental feature > > - they don't need a versioning mechanism, because they are effectively > > always "alpha" - i.e. non-stable, so any PHP release can introduce a > > breaking change into an experimental feature > > Just to maybe have a more complete picture, here are some possible > advantages of extensions over experimental features; > - Core developers don't have to support/maintain it (they already have a > lot on their plate) > - Extensions have the notion of alpha/beta/stable releases and they can > offer different versions at the same time. > - Having to install them manually makes it obvious that you are on your > own if you use them in production but the notion of a stable extension is > an indication that it is not completely reckless :-) > > The fact that you explicitly list always being alpha as an advantage for > experimental features makes me wonder when I would actually use them: > - Certainly not in production? Which limits the amount of exposure such a > feature gets to real world usage, therefore limiting the amount of insigh= t > in the usefulness too. > - A branch for a future version of your code? But the experimental featur= e > could disappear anytime again, do you want to rely on the feature at some > point becoming standard? > > My $.02, > - Chris > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --0000000000006f5fc705ea4c9b3f--