|
|
|
|
|
by MCRed
4175 days ago
|
|
It's the verbosity that I'm talking about. In go I end up with %70 of my code being error handling or error related... with Elixir it's close to %0.01. I'm giving estimates here, of course, but they aren't off by much. With elixir, using try catch is rare, because it should never crash, and when it does, you lose a process and debug it. With go, every line that calls a function needs to check to see if there was an error. And handling that error takes at least another line or two. Unless there's a better way that I'm missing. |
|
Those numbers you gave, even when you said they're estimates, still seems like made up numbers. I've never used Elixir, so if you could point me to an example so I can be more informed, I'll be grateful :) but also I've read some Go programs (not many, I'm not an expert) and it didn't seem to me that 70% of the code is dedicated to error handling.
Note that I'm not defending Go's position on error handling, I'm asking about error handling in general, what does people mean with "easy way to do it".
[1]: http://blog.golang.org/errors-are-values