Re: [RFC] Default expression
| From: | Rowan Tommins [IMSoP] | Date: | Sun, 25 Aug 2024 23:06:24 +0000 |
| Subject: | Re: [RFC] Default expression | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125248@lists.php.net to get a copy of this message | ||
On 25 August 2024 23:42:20 BST, Bilge <bilge@scriptfusion.com> wrote:
>On 25/08/2024 23:31, Rowan Tommins [IMSoP] wrote:
>> It doesn't, unfortunately, persuade me that the behaviour proposed is sensible.
>
>It should. But since it has apparently failed in that regard, I suggest you take me up on my
>challenge to implement the grammar you want with a patch and you will quickly convince yourself one
>way or the other.
I think I have been perfectly consistent in saying that I am discussing the proposed language
behaviour, not anything about how it could or should be implemented.
If it's a case of "unfortunately, doing the right thing is impossible, so we're
proposing this compromise", then that's a reasonable position, but not how this has been
presented. I also think it is perfectly reasonable to conclude that the compromise gives away too
much.
In particular, I think allowing assignments and method calls to "read out" a value which
was previously a private implementation detail accessible only through the Reflection API, is a
significant language change with a net negative impact. If that's the required tradeoff to
allow "(some expression) ?: default", then my position is we should do without it.
Regards,
Rowan Tommins
[IMSoP]