Why does everyone hate goto? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does everyone hate goto?

Recently I posted my 1st question regarding the use of comments, so to continue on the topic of good coding practices, I'd like to ask: why the goto statement is being regarded as a no-no? My language is C# and I don't use goto often, but sometimes it seems like a good idea to use it in nested loops or switch blocks. And there were situations where I was about to use goto but decided not to - not because I viewed it bad but just because I thought someone wouldn't like it and I wouldn't get a job eventually.

26th Nov 2017, 10:48 AM
Arseniy Bartashevich
1 Answer
0
Tnanks for the provided links, good stuff. I enjoyed reading the correspondence between Torvalds and Wilkens. I love Linus' attitude.
26th Nov 2017, 11:16 AM
Arseniy Bartashevich