Hacker News new | past | comments | ask | show | jobs | submit login

Rust and Go are different classes of language, where Rust is a non-GC memory-safe language, and Go is a statically typed GC language.

In Go's language class of statically typed GC languages, Go is much worse than the best languages, which are Kotlin and C# (Go lets you forget to write error handling, had no generics until recently, uses duck typed interfaces (!)).

In general, Go's inferiority can be traced to its root cause, which is the Google Go designers having severe Dunning-Kruger syndrome because they think they are good because they invented C/Unix and work at Google and don't realize they have no clue about programming languages in general and were only successful because the limited hardware at the time didn't allow sophisticated programming languages and thus allowed a terrible language like C to succeed.

As a language class, non-GC memory safe languages are far better than statically typed GC languages since they don't have the overhead of a GC and can guarantee the correctness of concurrent programs since they are data-race free (in Go-like language two threads can share the same data with no checks whatsoever resulting in arbitrary racy behavior), can make other guarantees enabled by the linear type system and use composition instead of implementation inheritance.

So in general you should always use Rust unless existing framework or libraries for other languages make solving the problem much easier and the app code is small enough that the extra problems in using a subpar language aren't too bad (e.g. you probably want to use bash for system administration, Python for simple deep learning projects, Kotlin for simple Android apps, Swift for simple iOS apps, TypeScript for simple web frontends, etc.).

However, if you plan to write a lot of code, then just using the best language, i.e. Rust, is probably better since the time to write or correct dependencies will be small compared to the sheer amount of code you are planning to write for the main software.

If you are willing to give up good performance and a large library ecosystem for correctness, then dependently typed languages like Idris are also an option.




You lost me at saying Go let's you forget to handle errors, when its pretty objectively more vocal at having you not handle them than Kotlin with its lack of checked exceptions, having just said Kotlin (and C#) are better than Go in its class. And I say this as a big fan of both Go, Kotlin and Rust.


Ok show me how to use Rust for my big deep learning projects or even in big iOS projects and i'll switch :D




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: