On 26/08/2024 22:27, Matthew Weier O'Phinney wrote:
Again, there are a few lists going around on this thread, and I hope that Bilge is taking notes to add to the RFC, and working with the folks who helped him with implementation to determine what is and is not possible in terms of the grammar so we can potentially exclude the more problematic ones.

I am just about to amend the RFC with the major discussion points from detractors, however I am still missing a list of even one item that must absolutely be prohibited, along with an explanation as to why.

FWIW, I have had the grand fortune to work with, or receive direct feedback from, some of the most talented PHP heads in the scene (read: engine maintainers) and they (so far) have unanimously confessed they do not see any issue with any permutation of default as an expression. Indeed, the entire point of the expression grammar is they can be composed freely with one another in any way you like; to do otherwise would be radical departure from the intended behaviour.

In case it matters, my initial inclination was also to do what some others have suggested, and modify the SEND opcodes so that the default is not actually looked up using reflection at all, but rather we just send nothing to the function and it can use its default as it would normally, but since I had the good sense to ask an engine maintainer how they would approach this problem, they cautioned me that this was the approach Stas took 10 years ago <https://github.com/php/php-src/compare/master...smalyshev:php-src:skip_params7>, that that approach was horrendous (paraphrasing) and they would never support something like that (mainly because there's like 11 of them and modifying them all would be a complete mess). So whilst you might find me quite unmoved by some of the arguments put forth on the mailing list and generally difficult to convince, it is not because I am stubborn in my naivete, it is because when wisdom was imparted, I listened. I am but a small man standing on the shoulders of giants.

Kind regards,
Bilge

Reply via email to