Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11664 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66859 invoked by uid 1010); 30 Jul 2004 13:12:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66800 invoked from network); 30 Jul 2004 13:12:32 -0000 Received: from unknown (HELO asuka.prohost.org) (69.196.31.138) by pb1.pair.com with SMTP; 30 Jul 2004 13:12:32 -0000 Received: (qmail 3398 invoked from network); 30 Jul 2004 13:12:32 -0000 Received: from rei.nerv (HELO dummy.com) (rei@192.168.1.1) by asuka.nerv with SMTP; 30 Jul 2004 13:12:32 -0000 Reply-To: ilia@prohost.org To: internals@lists.php.net, Andi Gutmans Date: Fri, 30 Jul 2004 09:12:35 -0400 User-Agent: KMail/1.6.1 References: <20040729021337.73894.qmail@pb1.pair.com> <41099EB2.9090403@hristov.com> <5.1.0.14.2.20040729232459.02f31418@127.0.0.1> In-Reply-To: <5.1.0.14.2.20040729232459.02f31418@127.0.0.1> Organization: Prohost.org MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <200407300912.35551.ilia@prohost.org> Subject: Re: [PHP-DEV] GOTO operator From: ilia@prohost.org (Ilia Alshanetsky) On July 30, 2004 02:43 am, Andi Gutmans wrote: > At 04:55 PM 7/29/2004 -0700, Sara Golemon wrote: > I think there are only two cases where goto is really interesting: > a) Error handling. > b) Auto-generating code or compiler compilers (Sterling mentioned these > two). c) Anywhere recursive functions are being used. d) small loop inlining There are other applications as you had yourself mentioned, ultimately goto is a construct that can be used for both good & bad code. But that can be said for many of PHP's features that no one even suggests removing. > Yes, any programmer can shoot himself in the foot with other PHP features, > but we do have a responsibility to minimize that. One example is our > introduction of E_STRICT. We don't warn about enough things but we do try. > Why give our developers yet another way of shooting themselves in the foot? > Or should I say, blow off their leg? :) If we really want to protect the user from themselves perhaps we should limit the user to addition and subtraction between the values of 1 and 100. That is ultimately what would become a language designed for the lowest common denominator. You can already do some pretty wild things without triggering any notices with perfectly valid and even working code. But that code will be 100% unreadable let alone maintainable adding gotos will unlikely to change that in any significant way. While without a doubt some people will abuse GOTO there are plenty of developers who'd put it to good use in their application, perhaps utilizing it ways we haven't even considered yet. If anything this discussion had proved that there is much support/need for GOTOs in both PHP developer and user communities. Ilia