The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I don't know who you are. I don't know what you want, but I have a very particular lack of skills. I will never be able to find you. But what I do have is two dollars and a Casio wristwatch. You can have one of them.
it's an old view but as a Hardware/Firmware type I cannot see the hatred for goto, I mean the jmp is a direct map and it produces a smaller binary. Goto is like an axe very useful but very dangerous. An axe wont cut your hand off, misuse it and you could be missing a hand very easily!
Coming from a embedded back ground, GOTO maps directly to JMP! write assembly without JMP. Like you said I battled with object oriented code that is c*ap but well structured. I like anything don't blame the tools, blame the tool using the tool!
In high level languages... Ok, maybe you have more possibilities and you should avoid using goto's
But try to programm in Assembly, in PLC LAD or other similar "low" level languages without it.
It is like many other things. Use it wisely and there would be no problems. Abuse or misuse it... and you will burn in hell (or you will be damned and sent to hell by the people who inherit your code)
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
1. Create a workflow manager using generics, interfaces, class abstraction, enums for state and continuation.
2. Break up your code into small workflow steps.
3. On each step, check for termination.
4. Or to get really fancy, return a code that says what step in the workflow to skip to.
5. If you really want to be cool, allow for async workflow steps!