2 ms·
It’s already exists in other languages and it exists because a function could have multiple different exit points. Even if Go had different error handling there
by laumars 5y ago
It’s already exists in other languages and it exists because a function could have multiple different exit points. Even if Go had different error handling there might well be different exit points. Hence why defer isn’t a Go-specific feature.