re: Go 2 Draft: Error Handling VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

Uhhh nope

You doesn't talk like a coder. Real coder will answer "Nope, I used them" or "Indeed, I didn't use them". I don't understand you.

but in Go we've got interfaces

Are you sure about "uhhh nope"? Visitor pattern destroys readability (and performance for short unions replacement - and we actually need only short unions), other interface based approaches in Go don't provide type safety.

even contract-based generics soon

generics are orthogonal to to algebraic/variadic data types. They become much better with generics though and can provide full type safety for error handling (unlike current approach).

I am afraid you are actually have a little sense about the idea.

Don't waste your time arguing. Go is designed to minimize amount of computer science needed to do work. It is NOT designed for productivity or engineer happiness. It is specifically designed to make developers easily replaceable.

code of conduct - report abuse