Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Would you use 'goto' here?

by atcroft (Monsignor)
on Dec 06, 2001 at 06:40 UTC ( #129836=note: print w/ replies, xml ) Need Help??


in reply to Would you use 'goto' here?

It is important to note that the statement Djikstra made regarding GOTOs was in the late 1960s-a result of studying numerous programs where the use of GOTOs, combined with the relative lack of programming structures, made the code hard to follow, error-prone, and difficult and costly to maintain.

The statement that GOTOs are bad is now taken almost as dogma, but what must be kept in mind is this: if the use of it improves whatever metric you choose to look at, be it read/maintainability in code that must be maintained in production for a lengthy period of time or efficiency in an application where performance is a major issue, then by all means the use of it should be allowed.

Remember that another solution may also exist, though, and may be preferrable, especially if style or style conflicts are an issue, others who must assist in maintaining code have difficulties from their use, or if their use starts to become abusive.


Comment on Re: Would you use 'goto' here?
Re: Re: Would you use 'goto' here?
by clintp (Curate) on Dec 06, 2001 at 20:20 UTC
    It is important to note that the statement Djikstra made regarding GOTOs was in the late 1960s-a result of studying numerous programs where the use of GOTOs, combined with the relative lack of programming structures, made the code hard to follow, error-prone, and difficult and costly to maintain
    Has anyone gone back and re-done this study in the last 30 years? Are we just repeating things that our forerunners thought was true because we're too lazy to go back and check our facts? Might be worth study.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (17)
As of 2014-10-30 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls