Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11704 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38680 invoked by uid 1010); 30 Jul 2004 18:48:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38638 invoked by uid 1007); 30 Jul 2004 18:48:07 -0000 Message-ID: <20040730184806.38636.qmail@pb1.pair.com> To: internals@lists.php.net Date: Fri, 30 Jul 2004 20:48:03 +0200 References: <410A05C7.8060300@php.net> <991897923.20040730195601@marcus-boerger.de> Lines: 26 User-Agent: KNode/0.7.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 84.128.32.99 Subject: Re: [PHP-DEV] Removing Try and Catch From: johannes@php.net (Johannes Schlueter) Hi Marcus, Marcus Boerger wrote: > i thought of ignoring all of this thread but you didn't let me. > Exceptions are neccessary for constructor failure and there is no > other way to do it. So what about removing constructors, too? $object = new class; if (!$object->init()) die; (no, this wasn't serious) > BUT even though goto is needed for non oo > generator code (compiler compilers etc.) it is a dangerous thing > that basically promotes spagetti code. But goto can also create cleaner code and other PHP features can be abused, too. I'm sure no one here who wants PHP to be a second Perl ;-) In particular for small shell scripts, where I don't want to use OO it can be quite usefull to me, and if it is documented properly I think it wouldn't do that much harm - some people already write ugly, unreadable code, this is possible without goto. johannes