Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Would you use 'goto' here?

by Masem (Monsignor)
on Dec 06, 2001 at 03:31 UTC ( [id://129800]=note: print w/replies, xml ) Need Help??


in reply to Would you use 'goto' here?

I think the fact that you had to explain the special form in your errata to the original message is a good enough reason. The normal concept of a goto statement should be understood, save for syntax, by any programmer. However, the form of goto that you are using here isn't consistent with that, and would require a good reading of the docs to understand the implications of using it. Functionally, it does exactly what you want, but realistically, will other programmers that might look at this code understand it?

That said, this might be a cool use for it, but as you also point out, I think the non-goto form is easier to see and understand. In addition, if you are talking dispatch tables and logic otherwise, I would try to improve the logic of the dispatch tables and thus avoid trying to make that second dispatch function call inside the first dispatch call.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://129800]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (None)
    As of 2024-04-25 03:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found