3 ms·
> Go does support multiple return values, commonly (T, error). Sure, and Nim supports multiple return values too. But having to handle this extra value at ever
by dom96 9y ago
> Go does support multiple return values, commonly (T, error).
Sure, and Nim supports multiple return values too. But having to handle this extra value at every function call seems like it would get old really fast. I don't want to worry about every single exception when I am prototyping for example. Also, without stack traces, how do I know where an error comes from?
> Regarding generics, the more I used golang, the less I had a need for generics. Also, there is solutions if you insist, such as https://github.com/cheekybits/genny https://github.com/cheekybits/genny
Indeed, like I said, I haven't used it much so perhaps I would be able to live without generics. It is still very nice that Nim offers them though.
- kskskuejej2 9y ago> I don't want to worry about every single exception when I am prototyping for example. You are free to ignore the returned error, so for example to compare with a situation where you would raise an exception in another language inside a function, but not wrap the call in a try-catch: val, _ := funcThatCanFail() > Also, without stack traces, how do I know where an error comes from? Go does have stack traces