DEV Community

Discussion on: Code Smell 72 - Return Codes

dakujem profile image
Andrej Rypo

That's exactly the same thing that occured to me, at first. Except, in Go they call "them" Errors and they are the mechanism that serves the same purpose, implemented different way. In the same manner you probably shouldn't return error codes in Go, but return Error objects as the second return value.

mcsee profile image
Maxi Contieri Author

Yes. That is why I would chose a more mature language and not one based on the 60s.

But if performance is the ONLY concern I think we can tolerate lots of code smells . It is a price to pay