Remix.run Logo
anonnon 4 hours ago

Yes, I don't know why people are downvoting me. Have these people never seen C code using goto-based error handling?

dhosek 10 minutes ago | parent | next [-]

I mean, I’ve not written C code in decades¹ and this didn’t cause a second’s pause.

1. Long enough ago that the only practical way to get syntax highlighting was to run a separate program on the source code to generate a TeX document.

NackerHughes 2 hours ago | parent | prev [-]

I wouldn't be surprised if a fair majority of them have been taught to see goto as nothing but a vestige of the 70s which should never be used under any circumstances except as a meme or to deliberately obfuscate code.

I have recently become quite fond of goto-based error handling and find it a lot cleaner and more readable than the if-else-mountains you otherwise end up with. I just make sure to leave a comment with a link to xkcd.com/292 so anyone else reading it knows I'm aware of what I'm doing. Now with this URL trick I can do both in one line. :)