goto = evil? in Design Philosophy
|
|
I've been reading some old forum posts about goto being evil and ineffecient. I'm curious, if it is 'evil' why is it in the DM language? Or does it actually have a useful function?(If so could someone show me an example?)
|
Using goto also encourages programming in hugemongous sections of code where smaller procedures should be used and called instead. This makes it easier to pinpoint where the bit of code you want to change is as you can skip directly to procedure in the tree view of DM but not skip to label without using find.
Goto and similar keywords are used in many programming languages. I believe this may have been an offshoot from the ability to use labels in assembly code, and simply been mimic'd by third generation languages.