Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-06-25 03:01 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.