[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    Re: [PHP-DEV] Continued try blocks
From:       Pierre Joye <pierre.php () gmail ! com>
Date:       2013-04-30 17:57:40
Message-ID: CAEZPtU6bjiTJ6CjbA_7W6YX+Qh65F0xMu_XOH+g5wZZcV8zPCQ () mail ! gmail ! com
[Download RAW message or body]

hi,

On Tue, Apr 30, 2013 at 7:54 PM, Stas Malyshev <smalyshev@sugarcrm.com> wrote:

>> You may have a lib/object/chunk of code which raises exceptions, because
>> its developer thought some error is not recoverable; but when you use
>> it, you don't want to break your program's execution.
>
> That's why you have try/catch.

Exactly, I cannot agree more here.

This proposal brings yet again exceptions for control flow, which is
really not what they are designed for (no matter the language, or
almost all languages). An exception can be handled and the program can
continue? Catch it, any other tricks bring control flow using
exception and that's really a bad idea.

Cheers,
--
Pierre

@pierrejoye | http://www.libgd.org

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic