shavetheyaks
shavetheyaks t1_iy78ycb wrote
Reply to comment by jphamlore in Why Functional Programming Should Be the Future of Software Development by fchung
I hate this article too (all the "examples" they give are exaggerated and abstract, and halfway through it turns into a not-so-subtle ad for their company), but I would argue that having to use goto for those things is a (soft) flaw in the C language.
My understanding of structured programming is that they took uses of goto and built them into the language to make it easier for the compiler/programmer to reason about them. Error handling and loop restarting are structured patterns that could have been added to the language itself.
Those patterns are so few and easy to reason about that I don't think there's any reason to add things like try/catch to C, but I don't think the presence of goto in C code means that goto is necesssary or desireable (except maybe for the crazy context-switching code you'd see in an OS).
shavetheyaks t1_iyagi6f wrote
Reply to comment by Deadmist in Why Functional Programming Should Be the Future of Software Development by fchung
The problem is that modern languages still don't target C's niche (systems and embedded) as well as C does. So we're stuck with it for those cases until something else comes along.
The only thing I know of that's trying for C's niche is Rust, and it's still not ready for it yet, IMO.