If you don't understand an argument for something, but still use it anyway, you are probably wrong. This is called cargo culting.

Inspired by some dude telling me git's code is bad because it uses goto a lot.

@sir As someone who's not new but also not too well seasoned, I understand that labels and gotos don't communicate intent to your future self and to those who may also be reading your code, but in what situation is using a goto in C a good practice?

@Lofenyy mainly for error handling, to branch to an alternative exit condition which cleans up any resources allocated during the function

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!