The first paragraph of the documentation for goto gives a good enough reason. Simply put, it's not needed.
For other reasons, it breaks the flow of control of programs. But this is not a perl issue as much as it is a greater programming issue. There are plenty of books on the subject of programming style. Pick up a couple of you're curious.
Goto is sloppy. The newer techniques tend to package data and algorithms together, compartmentalize it, which is good for a variety of reasons. They make things more portable, for one. Libraries would not be possible with goto, or at least the implementation wouldn't be nearly as clean. I started out with Atari basic (which only used goto to call functions), and it was a nightmare to track down a problem, even in small programs. I'm not sure how jumping in and out of blocks would effect things, but I'm sure it would make things more complicated.
Object orientation is one more step away from the problems that goto tends to cause.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.