News for hackers. Stuff that matters.
Re:Coding style and undoing indentation hell by lfaraone on Friday June 01, 2012 @01:36PM (#4054594)
I stopped reading when he recommended if-goto.
Re:Coding style and undoing indentation hell by bingaling on Friday June 01, 2012 @04:25PM (#4055557)
Usage of goto is fine (the effects are easily understood) when the destination only points to lines ahead of the goto, within the same block.

In this case, it makes the control flow more readable.

http://www.kerneltrap.org/node/553/2131

Re:Coding style and undoing indentation hell by Camillo on Friday June 01, 2012 @01:58PM (#4054720)
What if it were called "try/finally" instead?
Re:Coding style and undoing indentation hell by DeepDuh on Saturday June 02, 2012 @11:09AM (#4058219)
I read the comments just expecting yours. Something must obviously bad if Dijkstra says so, right? We don't have to think for ourselves anymore if the god of CS himself has banned something, right?
Re:Coding style and undoing indentation hell by dmaz on Friday June 01, 2012 @01:52PM (#4054689)
Sure, goto was abused, but it's no worse than (or even better than) using continuations or using break and continue.
Re:Coding style and undoing indentation hell by crusso on Friday June 01, 2012 @02:45PM (#4054957)
Any of those mysterious jump-to-somewhere-else code features resemble goto. Not that I don't think they clean up some nesting issues, but they're pretty much the same thing as goto.
Re:Coding style and undoing indentation hell by huhtenberg on Friday June 01, 2012 @05:44PM (#4055994)
Too bad, because it's the only sensible advice in the whole post.