3 ms·
You can represent sum types with type assertions on interfaces. Frankly, outside of subjective error handling preferences, I don't see much value in sum types
by pphysch 5y ago
You can represent sum types with type assertions on interfaces.
Frankly, outside of subjective error handling preferences, I don't see much value in sum types. They encourage building towers of type abstractions and obscure what is happening on the wire.
- friedman23 5y ago> obscure what is happening on the wire They obscure nothing, sum types in rust have 0 overhead. You cannot in go faith argue that Go gives a more accurate representation of what occurs "on the wire" than Rust.
- pphysch 5y ago