Goto exists in C. If you affirm that goto should not exist in PHP because it gives the opportunity to screw their code to programmers, are you also affirming that C programmers are smarter than PHP programmers ? Goto has had a bad reputation for far too much time.
+1 for goto. On 11/27/05, Zeev Suraski <[EMAIL PROTECTED]> wrote: > > At 20:03 27/11/2005, Robert Cummings wrote: > >On Sun, 2005-11-27 at 07:54, Zeev Suraski wrote: > > > Guys, > > > > > > Laughter has nothing to do with it. > > > > > > However, as discussed between those who attended the meeting in > > > Paris, goto earned its bad connotations for a reason. > > > >Goto got it's bad name from when it was used to jump to line numbers. I > >can't think of a case where jumping to a label within current cope is in > >any way unclear. > > > > > It was agreed > > > that providing a general-purpose C-goto equivalent is not a good idea > > > because it *will* very quickly lead to spaghetti coding styles. We > > > also came to the conclusion that the main use case that is not > > > covered by PHP today is that of 'centralized' error recovery, which > > > requires forward jumping only (if it wasn't for that use case, I > > > think we would have had consensus not to add any type of goto at all). > > > > > > So, the logical conclusion appeared to be: > > > > > > 1. A forward-jumping construct only, to avoid giving users too much > > > ammo to shoot themselves in the foot with spaghetti coding. > > > >I think it should be called "leap" given your arguments. Because I think > >your having a "leap of faith" that you will EVER prevent bad developers > >from shooting themselves in the foot. > > Read one of my past posts that deal with how compatibility-breakage > is not binary but accumulating. The same applies to abuseable > features. The easier we make it to abuse the language, the worse it would > be. > > >IMHO you're marginalizing a useful operator to satisfy your perception > >of the reputation of goto. I don't think that reputation is well > >deserved, and I've never heard of spaghetti goto code in C... which as > >we know does allow backward and forward jumping within scope (not to be > >confused with none actually existing --- see previous comment about > >prevention of foot shooting). > > You've never heard of spaghetti goto code in C? I'm not sure if it's > a joke or not (too tired to understand it if it is) - but I certainly > have, and in the more distant past have seen quite a bit of it too. > > Zeev > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Nicolas Bérard Nault ([EMAIL PROTECTED]) "Maybe nature is fundamentally ugly, chaotic and complicated. But if it's like that, then I want out." -- Steven Weinberg (prix Nobel de physique, 1979).