3 ms·
I've posted reasons why here : https://news.ycombinator.com/item?id=10949667 https://news.ycombinator.com/item?id=10949667 more reasons: On error handling, in
by allan_s 11y ago
I've posted reasons why here : https://news.ycombinator.com/item?id=10949667 https://news.ycombinator.com/item?id=10949667
more reasons:
On error handling, in Go most of libraries and even some part of the std lib, erros are constant string, which mean that for example you can only do
`err == foo.DUPLICATE_KEY_ERROR`
but you can't extract which key, or then you start to have to either use an external library to do some string masking/unmasking, which complicate quite things and add one more dependency, or just to say "screw it, i will just log 'duplicate key error" which is unoptimal
I really did try go, to the point I even proposed a fix in the std library for a long standing bug in the xml library https://go-review.googlesource.com/#/c/15684/ https://go-review.googlesource.com/#/c/15684/ , but not all the reason stated above makes me consider go as "yes sure it's an improvement over php/python/c++" but rust is like an even bigger improvement