Hacker News new | ask | show | jobs
by mixedCase 1486 days ago
The advantage then is "the type system", not "fast compile time".

And as far as type systems go, Go is one of the worst in mainstream usage.

2 comments

Just curious, which languages have better type systems?
TypeScript, Kotlin, Scala, Haskell, Rust, Swift, modern Java, C#, F#, OCaml, Reason, Elm, PureScript,... it's a long list.

I'd also count Python with MyPy, but having a mostly untyped ecosystem means you can't take much advantage of it.

It's easier to list which ones don't at this point. The Go team ignored the last 50 years of improvements in type systems.
All of them? Minus the dynamic/weaks, such as original javascript.
Rust, Haskell, OCaml, and many others.

Golang's typing system is fairly half-done.

But still better than Python's.
Despite its warts, Python's type system is at least comparable to Go, and better in several areas. The type inference works really well much of the time without any assistance, you can use tools like pyre to generate types for untyped code, as well as tools for discerning types through running the application.

Heck, you can even use HKTs in Python if you are willing to install a plugin/library.

https://returns.readthedocs.io/en/latest/pages/hkt.html