Re: [RFC] Default expression

From: Date: Sun, 25 Aug 2024 22:31:57 +0000
Subject: Re: [RFC] Default expression
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message


On 25 August 2024 22:51:45 BST, Bilge <[email protected]> wrote:
>Great! I'm glad we're finally getting to this, because I think this is what you, and
>everyone advocating for a restricted grammar, is actually missing. You think you've caught me
>in some kind of "gotcha" moment, but fair warning, I'm about to play my Uno Reverse
>card.

You could have got to it much quicker by just saying it earlier, particularly when explaining how
the current implementation is *not* the easy path.

I was not in the slightest thinking I'd caught any kind of "gotcha", I was repeating
something I'd already said multiple times, that the *behaviour* I feel is justified is having
"default" usable in the RHS of a ternary or coalesce.

I'm not an expert on parsers, and never claimed to be, so it's not particularly surprising
to me that I've overlooked a reason why "expr ?: default" can't be included
without also including "default ?: expr", and will just have to take your word for it.

It doesn't, unfortunately, persuade me that the behaviour proposed is sensible.

Rowan Tommins
[IMSoP]


Thread (101 messages)

« previous php.internals (#125245) next »