Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: organizing program structure

by JavaFan (Canon)
on Jul 22, 2010 at 22:20 UTC ( #850932=note: print w/replies, xml ) Need Help??


in reply to Re: organizing program structure
in thread organizing program structure

But advice to not use goto was already voiced more than 20 years ago when bad programming style was prevalent in the old programming language BASIC.
One of the earliest "warnings" against the use of goto is Dijkstra's letter Go To Statement Considered Harmful (the title is by Niklaus Wirth, the editor of Communications of the ACM at the time - CACM is journal that printed Dijkstra's letter), published, IIRC, in 1968.

Dijkstra's argument was that most uses of goto makes it impossible to do structured programming. Note also that Dijkstra would make the same objections against constructs we all love: return, last, redo, next, eval. Just like goto, they allow blocks to have more than one exit point.

But that has nothing to do with subroutines.
Well, if I weren't able to use subroutines, I'd probably use goto a lot more than I do now.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://850932]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2018-02-24 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (311 votes). Check out past polls.

    Notices?