Am 05.10.2022 um 15:38 schrieb Alex Wells <autau...@gmail.com>:
> Advantages of experimental features over extensions:
> - they allow changes to the parser
> - they are universally supported (by IDE's, parsers etc) because they are
> 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 regular
> code)
> - it's easy to implement a universal warning mechanism - for IDEs, static
> 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 insight in 
the usefulness too.
- A branch for a future version of your code? But the experimental feature 
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

Reply via email to