Quote:
Originally Posted by Vince
Every self-respecting programmer will tell you that goto must never be used. It inevitably leads to spaghetti code and there are always better ways to solve it. To avoid "repeating the code over and over again", as you so nicely put it, functions were invented.
|
There's nothing wrong with using goto as long as its used correctly and you won't abuse the function because it just looks cooler and looks harder to read. You can always avoid spaghetti code, if you know what you're doing then you won't get a spaghetti code. You can always use functions + goto at the same time but I don't known if there's difference between functions + repetitive ShowPlayerDialog or functions + goto and 1 ShowPlayerDialog.
ps I am typing on my phone, sorry if there's a sentence that doesn't make sense.