At 11:35 31/03/2003, Per Lundberg wrote:
On Sat, 2003-03-29 at 12:59, Zeev Suraski wrote:
> Remember that we don't want to encourage exception based programming anyway.
> Catching an exception should typically be the last thing done in a program,
> right before it terminates. Writing exception-driven applications is
> extremely discouraged.


What is the rationale behind this?

(a) This is very much the case for all languages that have exceptions. Exception handling is *slow*. Coding exception-driven apps in Java and C++ is a bad idea too. Exceptions were designed to handle errors, and not provide some nifty way of shifting control from one place to another.
(b) In PHP, exception handling results in memory leaks. Like all leaks in PHP, they'd be taken care of at the end of the request. Until the end of the request, however, certain chunks of memory will not be reclaimed.


Zeev


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



Reply via email to