Re: [RFC] Reclassifying engine warnings

From: Date: Wed, 28 Aug 2019 23:33:20 +0000
Subject: Re: [RFC] Reclassifying engine warnings
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-106781@lists.php.net to get a copy of this message
Hi! On 8/28/19 4:23 PM, Matthew Brown wrote: > $foo++ becoming 1 when $foo is undefined is not intuitive to me. I guess we have different intuition. > To take a very trivial example, that behaviour causes “for ($i = 0; > $i < 10; $I++) {}” to loop indefinitely. This is rather shallow issue, which any modern IDE would highlight for you in about 0.5 seconds. No need to change the language for that. Frankly, I have hard time remembering when any of such typos ever get past IDE check since I started using IDEs. And, of course, it's completely obvious issue - you could as well forget to write $i++ at all, or write $j++ and have $j defined somewhere... there's a lot of artificial scenarios one could think of. No reason to change rules of the whole language because of it. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#106781) next »