Derick Rethans wrote:
Then they are abusing exceptions big time. Throwing exceptions for
E_ERROR conditions *might* be a good idea, but for anything lower than
that: no way.

I agree wholeheartedly. Having worked with (Java) exceptions I realized that it is a _very_ hard instrument to use properly and if used poorly makes things *really* messy. Even after developing Java for over one year (with 10 years of programming experience in other languages) I was still not at the level where I could decide where to throw and where to catch exceptions without serious evaluation of the system.


New concepts (like PPP and exceptions) might be valuable in some contexts but they are _not easy_ to use and the common PHP developer *MUST NOT* be forced to use them. You might think I'm kidding about PPP being hard but believe me: Using the right access level for methods is not trivial as soon as you build a framework and then both use and extend it.

PPP and exceptions are *not* required to write even medium size applications (several 10k of lines), only DoD-style environments should _enforce_ such mechanisms.

> This also means that extensions usually should not throw
exceptions at all, as they are not supposed to throw E_ERRORs that abort
scripts right away.

Just curious: Is there such a policy right now? If so then this policy should be extended to exceptions.


My .02 CHF,
- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to