|
|
|
|
|
by nothrabannosir
2454 days ago
|
|
goto for error handling is not just "freeform anything goes goto". It's a very specific idiom, being an "error" label and a bunch of "if (resource) free(resource)" statements at the end of the function. It is essentially analogous to a common use case of Go's defer. Typically an accepted pattern when dealing with many resources and possible exit points. Prevalent in I/O heavy code. Different ballgame from the subject of Dijkstra's manifesto. |
|
Go, which is also known for its terrible error-handling.
Great.