Zeev,
>> We apparently have a different definition of "less". Your proposal >> requires >> you to worry about every type in every line of code that ever existed. >> Yes, >> there are fewer dangerous type change errors, but you need to look at >> every >> line of your application to find them. > > Realistically, that's not how it's going to be done, but rather through > testing (either running a test suite, manual tests, or even running it in > production and seeing deprecation warnings in the log, for which you'd have > years to fix). I don't see application audits being invoked for this, not > by a long shot. > > When I say you need to worry about them a lot less - I mean that you can get > 90%+ of the benefits of strict mode, for ALL of your code, with a tiny > fraction of the hassle. > From past posts, it's very clear you believe that large projects would > gradually migrate to being strict across the board. If we compared the Well then, you've heard things I've never said. I've said, time and time again, that weak and strict should live side by side **in the same application**. That you'd keep the outside code weak, and the critical parts will be strict. That's why dual mode is good. Not because it gives a "migration path", but lets people choose what's appropriate for their needs. So no, I don't believe that large projects would or should migrate to be strict across the board. If I did, I wouldn't make it per-file. >> If Symfony or PHPUnit didn't error in these cases in more than one place, >> I'd >> be inclined to agree with you (about not being as common as one might >> think). But considering two of the best architected and tested >> applications in >> the ecosystem both error in non-trivial amounts, I think it's fair to >> say... > > I think that once we see some more conclusive test results from these > projects, that go slightly deeper than just running the code and seeing > deprecation warnings - a lot more people would be inclined to agree. > Perhaps even you :) > > What constitutes major breakage in your mind, for a project as large as > PHPUnit, that's acceptable to fix over the course of several years? 20 > issues? 100? 200? 500? More? > What if many of these issues are actually pointing out potential real world > problems, and changing them would result in better more robust code? > >> >> The difference is with the dual-mode RFC you can choose not to have >> >> to cast and keep everything as-is today (or more specifically, you >> >> need to explicitly choose strict mode). And you can have user-land >> >> behave identically to internals **in both cases**. >> > >> > Put another way, coercive gets to keep a single, sensible conversion >> > rule-set in PHP - with relatively minor updates needed over the course >> > of several years. And contrary to what might be implied here, it >> > would require a LOT less casting - while still taking advantage of >> > much better data sanitation. >> >> I think you're REALLY downplaying the level of effort that's required for >> the >> updates you're requiring users make. And that scares me. > > Given that I actually ran Magento, Drupal, WordPress and both the Symfony > and ZF2 skeleton apps with the new coercive ruleset, and I already know > there's no reason at all to be scared. More on that later today or early > tomorrow - running more tests. They run without triggering E_DEPRECATED errors? Because that means they will break with 8 (which by your own words is closer to 2-3 years out than 9-10). Anthony -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php