Re: [RFC] Deprecate left-associative ternary operator
| From: | Sara Golemon | Date: | Thu, 25 Apr 2019 00:27:11 +0000 |
| Subject: | Re: [RFC] Deprecate left-associative ternary operator | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-105429@lists.php.net to get a copy of this message | ||
On Wed, Apr 24, 2019 at 6:48 PM Christoph M. Becker <cmbecker69@gmx.de>
wrote:
> On 24.04.2019 at 19:25, Sara Golemon wrote:
>
> > On Tue, Apr 23, 2019 at 3:56 AM Nikita Popov <nikita.ppv@gmail.com>
> wrote:
> >
> >> 20 years of code in the wild has not "accepted that fact and moved on".
> If
> >> a left-associative ternary is used, it is almost certainly a bug. If
> people
> >> use this structure by accident (because it is familiar from other
> >> programming languages), I'd like them to get an error instead of having
> to
> >> figure out why their obviously correct code is not working or, in the
> worse
> >> case, just leave behind buggy code.
> >
> > I'm on dismal wifi at the moment, else I'd do some searches, but do you
> > have any examples of code in the wild subject to this bug?
> > I agree it's a lousy state, but it's not emergent.
>
> See <https://externals.io/message/105345#105389>.
>
> Okay, so the most compelling part for me in this analysis is the fact
that Symfony and ZF have issues. I can shrug off a lot of questionable PHP
coders, but i have to acknowledge major frameworks stumbling on this gotcha.
Convinced.
+1
-Sara