Slashdot Mirror


Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful"

Edsger Dijkstra famously opined in 1968 on the danger of Goto statements. New submitter Mei Nagappan writes with a mellower view, nearly 50 years later: By qualitatively and quantitatively analyzing a statistically valid random sample from almost 2 million C files and 11K+ projects, we find that developers limit themselves to using goto appropriately in most cases, and not in an unrestricted manner like Dijkstra feared, thus suggesting that goto does not appear to be harmful in practice. (Here's the preprint linked from above abstract.)

2 of 677 comments (clear)

  1. Re:why? by ShanghaiBill · · Score: -1, Troll

    This is a very common pattern that I've seen in almost every large C code base that I've worked on.

    If you worked for me, and you wrote garbage like that, I would give you a verbal warning and show you how to do it correctly. If you did it again, I would give you a documented written warning. The third time, I would fire you.

  2. Re:why? by Anonymous Coward · · Score: 0, Troll

    4

    Filter error: You can type more than that for your comment.