Re:C for high level programmers (slides)
by sjolsen on Monday June 01, 2015 @02:36AM
(#9637044)
In the C code I've written, I've found there's really one major, common use for goto: stack unwinding. It usually looks something like
Personally, though, I prefer using C++ and destructors (and, where appropriate, exceptions):
Exceptions aren't always appropriate, but the C++ still usually ends up a little cleaner. I would love to see something like Haskell's Maybe monad that lets you write code like the above, but returning status information instead of throwing exceptions.
[ Parent
| on HN ]
There are no comments on this comment yet.