On Thu, Aug 29, 2019, 12:33 AM Stanislav Malyshev <smalys...@gmail.com> wrote:
> 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. > Can you point me to an IDE that runs on the server? I think you are mixing static analysis error with dynamic runtime analysis. IDE can't point to an error it doesn't know about(which I didn't code using IDE but use notepad, where I didn't run full test before publishing to production). I don't think it makes sense to allow the language be a home of "anything goes, no innovation". A language without specification.