Hacker News new | ask | show | jobs
by frakt0x90 1395 days ago
At least with VBA people are probably scarred by having to modify auto-generated macros, the atrocious error system, GOTOs, and the terrible excel IDE.
1 comments

I'll defend GOTOs! Everything is a GOTO, just in a different code construct. I find myself thinking in "GOTOs" all the time, and use bools in nearly the exact same way.

That said, I started programming in the 80s in BASIC and crack a loving smirk when I see a GOTO.

And it all boilds down to:

JC JNC JE/JZ JNE/JNZ JO JNO JP/ JPE JNP/ JPO JS JNS JA/ JNBE JAE/ JNB JBE/ JNA JG/ JNLE JGE/ JNL JL/ JNGE JLE/ JNG JCXZ

at the end :)

More modern features like "defer" should be enough to remove the last remaining needs for GOTO; even "try/catch/finally" may be enough for that.