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. 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). 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. | `------------------------------------------------------------' -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php