←back to thread

276 points chei0aiV | 1 comments | | HN request time: 0.421s | source
Show context
n0us ◴[] No.10458463[source]
I really could do without "considered harmful" titles. x86 has been one of the most influential technologies of all time and a clickbait title doesn't do it justice imo.
replies(7): >>10458515 #>>10458617 #>>10458692 #>>10458787 #>>10458861 #>>10459018 #>>10459478 #
wyager ◴[] No.10458692[source]
So were PHP and goto statements.

How influential something is has nothing to do with how good it is.

replies(2): >>10458720 #>>10459089 #
vezzy-fnord ◴[] No.10458720[source]
goto is just a mnemonic for jmp. It's the primitive from which all higher level control flow is ultimately derived. It isn't harmful, and it's used a lot even in C.
replies(4): >>10458822 #>>10459151 #>>10459176 #>>10459619 #
mortehu ◴[] No.10459151[source]
> [goto] is the primitive from which all higher level control flow is ultimately derived

I'm pretty sure you cannot implement conditional branches using unconditional branches as a building block. Unless you count indirect branches, which goto usually doesn't support.

replies(1): >>10459382 #
1. taeric ◴[] No.10459382[source]
Not that I'd recommend it, but sure you can. Just allow modification of the code to include where you want to jump to. :)

Scarily enough, I think this used to actually be somewhat common place and is why many functions were not reentrant.