News for hackers. Stuff that matters.
Re:How The Post covered the ‘grand social experiment’ of the... by edw519 on Thursday December 05, 2013 @08:06AM (#6854169)
"And yeah, I remember that fill code. I always felt guilty because it contained a goto statement. I don't think I've written a "goto" since."

Loved this!

Glad I'm not the only one :-) My last goto statement was in 1984, rejected by Code Review.

I haven't written a goto since. And I haven't cared much for Code Review since, either.

Re:How The Post covered the ‘grand social experiment’ of the... by barrkel on Thursday December 05, 2013 @08:23AM (#6854213)
Gotos aren't that infrequent in C and C++ written without exceptions or longjmps, and stack-based cleanup needs to occur.

Last time I wrote a goto in a language that did have exceptions was the alignment portion of an unrolled loop implementation of a hash algorithm. Delphi doesn't support C-style switch statements where one case flows into the next; so the alignment switch did jumps into the unrolled loop body.

Re:How The Post covered the ‘grand social experiment’ of the... by mratzloff on Thursday December 05, 2013 @11:57AM (#6855436)
Yep. Gotos can be the cleanest way of handling certain errors in C.
Re:How The Post covered the ‘grand social experiment’ of the... by kroger on Thursday December 05, 2013 @08:30AM (#6854240)
"By the way, if you don’t like goto statements, don’t read this. (And don’t read any other programs that simulate multistate systems.)" Knuth, on the Adventure game [1] Knuth's "Structured programming with go to statements" [2] is always a good read.

[1] http://www.literateprogramming.com/adventure.pdf

[2] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.103....

EDIT: formatting