5 ms·
I like the idea of throwing better. The whole point is reducing boiler plate so that a conditional return can be made. Something like this: f, err := os.Op
by hacknat 7y ago
I like the idea of throwing better. The whole point is reducing boiler plate so that a conditional return can be made.
Something like this:
f, err := os.Open(filename)
throw err
This allows alternate signatures easily. I also think the syntax makes a little more sense, as you're "throwing" the error up the chain unceremoniously.