3 ms·
> Go and Python and not having such a powerful type system at my disposal. Python may not have that great type support. But I found Go type system to be quite
by akmittal 8y ago
> Go and Python and not having such a powerful type system at my disposal.
Python may not have that great type support. But I found Go type system to be quite good. Can you elaborate
- omeze 8y agoThe biggest annoyances are the lack of exhaustive pattern matching and the lack of sum types. I say annoyances because its possible to get most of the behavior for sum types with interfaces but a lot more boilerplate must be written. And, while Go offers no exhaustive pattern matches, in practice the use of a default switch that returns an err works OK. But at the end of the day, I find my colleagues a lot less elegant and rigorous with their Go types/structs compared to their Typescript code because of the additional boilerplate, which makes me think language ergonomics around types makes a difference in code quality around data modeling. Its not an monumental chasm, but it exists.