At 15:55 2005-07-13, John Deighan wrote:
but that's another matter. (We initially used a "goto FINISH", but I hated that, too. You can use a "break" if you're in a loop.) We use a method that I really don't have time to describe now, but doesn't use a "goto". I hate goto's, but for the example above, it's efficient and much clearer than e.g. setting up a hash of op names and code to handle each op.
I think you just demonstrated why the dispatch table really is the way to go :)
For instance, did you remember to wrap the goto in an eval to catch missing labels?
It's not that goto is inherently bad, but it has a so very, very, very specific niche in modern languages with other program flow constructs. The only useful example I can think of is in C where you can use it to simplify resource allocation/deallocation. But in Perl... no.
Unless, of course, you're talking about goto LINE: http://search.cpan.org/~abergman/Acme-Goto-Line-0.01/Line.pm ;) /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos johanl AT DarSerMan.com Latest bookmark: "TCP Connection Passing" http://tcpcp.sourceforge.net/ dmoz: /Computers/Programming/Languages/JavaScript/ 12 _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
