PHP is a not a type strict language, far from it and it is unlikely it'll ever be such. It is also a not pure OOP language and I very much doubt it'll ever be one. While GOTO can be abused, so can any other language feature, such as OOP, or the ability to include remote files. If we add this feature certain warnings should made about it using it (as with almost any feature), but I see no reason to cripple advanced users simply other users may find fun and usual ways to abuse this useful functionality. Anyone who has ever written a parser will tell you GOTO is absolutely essential unless you want to go into recursive functions etc... which are way slower. GOTO also provides a fast an safe alternative to many solution where so far the only viable option (for most people) have been a recursive functions and those tend to smash the stack once in a while.
Ilia On July 29, 2004 10:17 am, Leonardo Pedretti wrote: > Goto is somewhat equivalent to 'case' combined with using 'continue' in > loops. More precisely, this 2 language constructions are the 'goto' > implementation with a different name so that Dijkstra does not get back > from the grave to punish us =D > It is true that goto is a little 'off-paradigm' in OOP and truly structured > languages, however, the point is this: sometimes continue and case produce > code that is not so clear and small at the same time as a little well used > goto. BUT goto allows non experienced or not well educated programmers to > begin writing horrible and totally unstructured code, and go further > developing bad programming habits... IMHO, would php be a more restrictive > language (strongly typed, or something alike) I would be totally and > unconditionally on for a goto addon. However, i see the bad habits and bad > code promotion as something that should be very carefully noted before > deciding whether to apply it or not. > I hope i have added some good points to help make the consideration deeper > and better =) > > Regards > Leo > > On Wednesday 28 July 2004 23:12, Sara Golemon wrote: > > I wrote up a patch for implementing gotos in php scripts a couple months > > ago as an exercise in working with the Zend engine. I put it aside > > assuming noone would actually want it, but Wez and Ilia convinced me to > > post it for consideration: > > > > Description: > > http://pecl.org > > > > Patch: > > http://pecl.org/patches/opcode_goto_5.1.0.diff > > > > Talk amongst yourselves... > > > > -Sara > > -- > > Leonardo Pedretti > Axon Sistemas > Líder de Equipo Proyecto Basalto -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php