Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105397 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77261 invoked from network); 24 Apr 2019 20:24:36 -0000 Received: from unknown (HELO mail-qt1-f182.google.com) (209.85.160.182) by pb1.pair.com with SMTP; 24 Apr 2019 20:24:36 -0000 Received: by mail-qt1-f182.google.com with SMTP id g4so1820873qtq.10 for ; Wed, 24 Apr 2019 10:25:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JjgGPK6qRDkdSMcP8Jjo8nrPF5rtyF59hRo7JVaTILs=; b=Lm4iNZwWGcrkEC3fRkzV41qEMifeCg14wO+R8MILheIm1Sdz8tG8GHHJAzizFETzyx 9f4a1SLp2e1kOt7ir3hdGbmEj2crZVT8AdhXX5KIOLMv+om/KiyPcLz9Mz+aRg7Fn4Ei cV4lB3GP9SJZiI0trmBxwKcQGqd21Ey4Egr/pN8qBnZCJ2+0DP/nEA2hHsQqux7ByYOV 3xAEtIsPyDyK25TLXon8JGWQUL1DJCVN/8rIoZXaJnOVK2rGIVKCd+BPPnr4/FkaeR5u T+3va9ejKgTiTTwPPEu/wzBnu8FdNRYGAhNup27JY6Cysv2y8UilFMrQciYL77gHuSE9 jb0g== X-Gm-Message-State: APjAAAUHUpmVjKwTUlZA56Ory8Fmm+YYKl1wjPC7Z0ROVKhqDAih2ZSX D6iubmmIEFUDdcZTeaDUSR99xvDzaCSup97eIudTqw== X-Google-Smtp-Source: APXvYqzV1cvFVd5T9cEzyZatNFaurUBmtapIu+ef8W9+yTuBoJbhKhO3KnrnvgBAJVMFLhKJ981vogdGzOvQ8zpQOu8= X-Received: by 2002:ac8:2a2e:: with SMTP id k43mr26750380qtk.353.1556126717451; Wed, 24 Apr 2019 10:25:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 24 Apr 2019 12:25:06 -0500 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000038383d058749fc46" Subject: Re: [PHP-DEV] [RFC] Deprecate left-associative ternary operator From: pollita@php.net (Sara Golemon) --00000000000038383d058749fc46 Content-Type: text/plain; charset="UTF-8" On Tue, Apr 23, 2019 at 3:56 AM Nikita Popov wrote: > Can't say I understand your position here. Don't want to change the > ternary from left-associative to right-associative? I can understand that: > Silent behavior changes are always problematic. This is not what the RFC > proposes though. > > Did the RFC change since introduction? I may have been looking at a stale load of the page (opened it up awhile ago and only just got around to responding). As for what it says atm, I still think it goes too far. the warning in 7.4 I can support, but I'm not a fan of breaking existing code on a feature that's this old. Ratchet up the warning in 8.0 if you'd like, but error is further than I'm willing to go on this one. > 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. -Sara --00000000000038383d058749fc46--