Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11736 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42390 invoked by uid 1010); 30 Jul 2004 21:21:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40244 invoked from network); 30 Jul 2004 21:20:56 -0000 Received: from unknown (HELO procata.com) (65.19.190.98) by pb1.pair.com with SMTP; 30 Jul 2004 21:20:56 -0000 Received: from [65.111.195.203] ([65.111.195.203]) by procata.com for ; Fri, 30 Jul 2004 14:20:51 -0700 In-Reply-To: <410AB085.6070508@emini.dk> References: <20040729021337.73894.qmail@pb1.pair.com> <200407291117.09573.lpedretti@suserver.com> <200407291037.12396.ilia@prohost.org> <41098F91.3000606@hristov.com> <004801c475bd$812f3580$0200a8c0@rusko> <410A5CBC.9090500@townnews.com> <410AB085.6070508@emini.dk> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <70D0E926-E26E-11D8-A36D-000502E1CD47@procata.com> Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Fri, 30 Jul 2004 17:21:37 -0400 To: Edin Kadribasic X-Mailer: Apple Mail (2.618) Subject: Re: [PHP-DEV] GOTO operator From: jeff@procata.com (Jeff Moore) On Jul 30, 2004, at 4:33 PM, Edin Kadribasic wrote: > Jeff Moore wrote: > >> Where did the if statements go? do_stuff(), do_more_stuff(), and >> do_even_more_stuff() should throw exceptions rather than return >> boolean error indicators. > > Now imagine do_stuff() and friends were native PHP functions ;) You might also have installed a standard error handler to raise some kinds of php errors as exceptions. In the worst case, you would have to add the if ... throws and you would be no worse off at the lowest level. However, the caller of the enclosing pseudocode() function would not have to check for a boolean error code and so try/catch is still a net gain.