3 ms·
Why would anyone want to use a programming language that uses product types instead of sum types for the return types of functions which can return errors? Or w
by ebingdom 5y ago
Why would anyone want to use a programming language that uses product types instead of sum types for the return types of functions which can return errors? Or why would anyone want to use a language that doesn't even let you write a type safe hash table? Also, the fact that Go suffers from the billion-dollar mistake is downright inexcusable. Go is way too error prone for me to sleep comfortably at night, because the lack of a reasonable type system is a constant liability.
- hedora 5y agoI think of Go as a better Python. If those are your two choices, Go is the clear winner.
- linkdd 5y agoHow is Go the clear winner? Python has been around since 1994 (2 years before Java: 1996). It's heavily used in Data Science and Science in general. The C API allows you to write code in most compiled language (C, C++, Rust, ...) and Python serves as a glue between business logics. Go simply does not serves the same purpose. There is no winner/loser here, just different use cases...
- zemo 5y agohave you ever actually maintained production Go systems or are you just saying things based on assumptions
- ebingdom 5y agoYes, I've worked on several Go systems. Nothing I mentioned about the language is an assumption; these are well-documented properties of Go. I've also have experience in a handful of languages which have more disciplined type systems (Rust, Haskell, Ocaml, TypeScript, , Kotlin, ...), and it's a night-and-day difference in terms of safety and reliability. Being able to confidently know that you've handled all error cases, that null pointers aren't hiding in your data, etc. is useful for safety.