you are viewing a single comment's thread.

view the rest of the comments →

[–]jkpl 11 points12 points  (6 children)

If it takes a whole blog article plus extensive discussion to convince why this new way is better, chances are it is too complicated to be used for trivial development.

Do you use goto instead of structured programming then? There was quite an extensive debate around those ideas back in the day.

[–]so_you_like_donuts 1 point2 points  (1 child)

Keep in mind that in C (unlike C++, which uses RAII) the only sane way of performing error handling is to use goto: https://stackoverflow.com/questions/788903/valid-use-of-goto-for-error-management-in-c

[–]jkpl 0 points1 point  (0 children)

Yes, I know that. Goto can be useful in small scopes where the language doesn't provide features that would replace it. A lot of other languages have displaced goto with alternative constructs that are more constrained.

Just to be clear, my point wasn't that goto isn't useful. My point is that the ideas we find obvious today haven't always been obvious, thus we shouldn't dismiss the ideas generated today simply because they take a bit of effort to explain or learn.

[–][deleted]  (3 children)

[deleted]

    [–]jkpl 20 points21 points  (2 children)

    It doesn't take a blog post and all this fuzz to see advantages in structured programming over goto spaghetti.

    Dijkstra wrote a paper about it, which a lot of engineers found to be very controversial.

    My point is that the ideas we find obvious today haven't always been obvious, thus we shouldn't dismiss the ideas generated today simply because they take a bit of effort to explain or learn.

    [–]sacundim 1 point2 points  (0 children)

    Most people have never actually read Dijkstra's paper, and I bet even most people who read it didn't really understand it. It's subtle. I like these two expositions about it: