5 ms·
It's a bit ridiculous to reduce Rust to the requirement of "performance" or parametric polymorphism. Go doesn't have a proper, complete type system. This means
by chmln 8y ago
It's a bit ridiculous to reduce Rust to the requirement of "performance" or parametric polymorphism.
Go doesn't have a proper, complete type system. This means entire classes of preventable bugs are not prevented by the compiler. Yeah, its fast, but you can pass in null instead of object references and the compiler won't even bat an eye. Not to mention the extremely verbose error handling and the lack of abstractions all around (no sum types, no iterators, no array filter/map, etc) despite being more "high-level" than Rust in layman terms.
- ilovecaching 8y ago> Go doesn't have a proper, complete type system. This is nonsense. There's no definition or checklist that defines what a complete type system is. In that vein, Haskell doesn't have a proper type system because it lacks dependent types, and a bunch of other features that are only available through language extensions. We are still not at a place yet where the from first principles, type driven approach is going to always be the right choice over the hack out code approach. Rust simply takes more investment to learn, and more time to master, and while I agree that investment pays off 1000x, and that Java and C++ should stop existing, Go is a better fit for the people who just want a productive, reasonably efficient language that can get stuff done. Having a very simple hammer like Go that limits what people can do and sticks to what people already know is useful and beneficial.
- chmln 8y ago> This is nonsense. There's no definition or checklist that defines what a complete type system is The Go programming language and the compiler have too many soundness holes, therefore I call the type system incomplete. When you can pass in a null literal in place of an object and the compiler doesn't stop you, it goes against any common sense. Not to mention the pervasive use of reflection (interface{}) due to lack of generics. Allowing null pointers to exist in a new programming language is a decision to ignore decades of progress in pl theory and type system research. It makes sense for google knowing the motivation behind Go, but telling people to avoid Rust unless they need polymorphism or performance is disingenuous at best. > We are still not at a place yet where the from first principles, type driven approach is going to always be the right choice over the hack out code approach. Why not?
- ramenmeal 8y agoI think I'm misunderstanding, but doesn't Java and C# allow you to pass null in the place of an object?
- chmln 8y agoYes, I know Java for sure allows this. There are workarounds to enforce stricter behavior via things like @NonNull and checker frameworks, but it obviously never works as well as it would on a language level.
- saagarjha 8y agoThey do, and this has largely been regarded as a hole in the type system.
- pjmlp 8y agoYes, but they are 20 years older than Go. C# 8 will fix this by switching defaults (opt-in due to backwards compatibility), and Java has type annotations since ages. Hence why it feels wrong to a new kid on the block to ignore what the language community at large already agreed were design errors.
- snaky 8y agoMaybe there's some pattern here "By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed" - Fran Allen