3 ms·
What does this offer that couldn't be accomplished with well placed goto's like in this example https://vilimpoc.org/research/raii-in-c/ https://vilimpoc.org/re
by tpoacher 6y ago
What does this offer that couldn't be accomplished with well placed goto's like in this example https://vilimpoc.org/research/raii-in-c/ https://vilimpoc.org/research/raii-in-c/ (yes I get that defer > raii, but the question is meant to be more general)
- tpoacher 6y agohm, ok, they address this in the paper. "This code [i.e. goto-error-handling] has the advantage of making the conditional error handling code explicit but at the cost of proximity; the cleanup code is removed from where its need arises. This linearization requires a naming convention for the labels [...]"