Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45349 invoked by uid 1010); 30 Jul 2004 15:49:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45011 invoked from network); 30 Jul 2004 15:49:33 -0000 Received: from unknown (HELO blobule.suds) (66.11.170.154) by pb1.pair.com with SMTP; 30 Jul 2004 15:49:33 -0000 Received: by blobule.suds (Postfix, from userid 501) id DC1962F727; Fri, 30 Jul 2004 11:49:31 -0400 (EDT) To: Lester Caine Cc: internals@lists.php.net In-Reply-To: <20040730100057.63379.qmail@pb1.pair.com> References: <20040729021337.73894.qmail@pb1.pair.com> <1091136355.490.4.camel@localhost> <1091139076.29517.12.camel@blobule.suds> <410991E1.6070000@hristov.com> <1091140927.29516.18.camel@blobule.suds> <41099925.4020700@hristov.com> <20040729225322.94418.qmail@pb1.pair.com> <41099C4A.4080206@hristov.com> <75910961.20040729190842@ionzoft.com> <41099EB2.9090403@hristov.com> <5.1.0.14.2.20040729232459.02f31418@127.0.0.1> <410A0EDE.8050902@emini.dk> <20040730100057.63379.qmail@pb1.pair.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8-3mdk Date: 30 Jul 2004 11:49:31 -0400 Message-ID: <1091202571.28068.7.camel@blobule.suds> Mime-Version: 1.0 Subject: Re: [PHP-DEV] GOTO operator From: robert@interjinn.com (Robert Cummings) On Fri, 2004-07-30 at 06:05, Lester Caine wrote: > Edin Kadribasic wrote: > > >> However, I think before talking about implementation, we need to > >> decide if goto is really good for PHP. > > > > As I mentioned earlier, goto is one of the few features that I really > > missed in the language for the past several years I've been using PHP. > > We can debate until the end of time about it, but the fact is that it > > can be a very useful tool. > > As long as it is not also a useful tool for hacking - GOTO -> backdoor! > > Personally I see NO advantage to GOTO in a structured language, and even > if it is added I've learnt enough in 30 years to avoid it. Surely CASE > is much safer and naturally 'contained'? As I mentioned in an earlier post, regardless of what you can do with case statements to emulate goto, why should I have to write O(n) code because some newbie can shoot himself in the foot, or some zealot can't get past the demonized goto construct of the ancient basic language. There's absolutely nothing unclear about using goto to jump to a named label within the owning function or method. It's definitely a lot clearer and elegant then setting up a bunch of flags, or break N levels out of while loops. Besides if you can make an argument for not having goto, then why not make an argument for not having variable variables, or variable function names. Come on, newbies can shoot themselves in the foot with those too, and yet I haven't heard much in the way of complaint. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'