On 25/06/2018 20:34, Michael Morris wrote:
So, about that Ternary operator?
My understanding is that major releases are the only ones allowed to have
breaking changes. Correcting the ternary operator to work like it does in
all other languages is a small example.
I don't think it's a good idea to turn this thread into a list of every
possible change we might want in PHP 8, but there is a general point to
be made here: the rule is that if you have a clear breaking change, it
is definitely not allowed in a minor release; not that it automatically
will be allowed in a major release.
Even a major release should maintain some compatibility - in particular,
it should be possible to write code that runs correctly on both the
previous and new versions. For instance: removing the old way of doing
something because a new way is already available, or making something an
error that was previously an avoidable warning.
In this example, changing the associativity directly would mean the same
code would run in both versions, but with different results, and that is
going to cause a lot of headaches. On the other hand, making it
*non-associative*, so that it was an error to write ambiguous code,
would probably save a lot of headaches.
Again, this feels less of a hardship if we plan major versions further
ahead: we might pencil in the new behaviour for 9.0, and be able to put
a date on that.
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php