Search posts, tags, users, and pages
GOTO was considered harmful 50 years ago TL;DR: Don't ever use GoTo. Problems Readability Hard to follow code Solutions Replace GOTO with structured code Use exceptions Context I started programming in Basic. GOTO was heavily abused there....
Maxi Contieri
@mcsee · Buenos Aires
Software Engineer
I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.
Markdown supported · ⌘↵ to post
Oscar Ablinger
Solutions Replace GOTO with structured code Use exceptions
Solutions
Imho exceptions aren't much better. They are essentially a goto where
goto
finally
2 & 3 are nice and probably the reason why they are still used today, but 1 is terrible for understanding bigger systems.
Oscar Ablinger
Imho exceptions aren't much better. They are essentially a
gotowheregotos but I assume there is no equivalent tofinally).2 & 3 are nice and probably the reason why they are still used today, but 1 is terrible for understanding bigger systems.