3 ms·
> I never thought this would happen, does this mean I should quit programming? Yes. > I feel like you can't get much done in a computer without branching in a
by lmm 4y ago
> I never thought this would happen, does this mean I should quit programming?
Yes.
> I feel like you can't get much done in a computer without branching in a CPU, but maybe I misunderstand modern CPU architecture.
Most CPUs have jump instructions, that doesn't mean it's a good idea to have gotos in your programming language.
- ok_dad 4y ago> > I never thought this would happen, does this mean I should quit programming? > Yes. Not sure what I expected, I'll turn in my resignation effective immediately.
- rep_lodsb 4y agoAll CPUs have jump instructions. General purpose computation isn't possible without it. Even 'if' / 'while' / etc. are syntactic sugar for 'goto'.
- lmm 4y ago> All CPUs have jump instructions. General purpose computation isn't possible without it. Technically not true, a Turing machine in the original sense only moves its head one position at a time (and I can imagine some early drum memory CPUs might have operated like that in real life). Of course one can emulate a processor that has jumps on a machine like that. > Even 'if' / 'while' / etc. are syntactic sugar for 'goto'. Structured programming is not just syntactic sugar; it gives you important properties that you can't get from using goto directly, hence why so many languages discourage or ban goto.