DEV Community

Discussion on: Code Smell 72 - Return Codes

Collapse
 
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.

Collapse
 
mcsee profile image
Maxi Contieri

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