Comparison: Rust vs Go


"They are not meant to be competing languages. They fill different needs, designed with different approaches and excels at different things.
If you want to write low-level stuff, something that needs every tiny bit of performance, working directly with the hardware or graphics, and you want to handle the memory. Basically something that you'd use C/C++ to write, something like kernel, driver, graphics library, a big library that exposes a C interface for other languages to call, a game that couldn't work well if there are GC pauses, or something like what Mozilla is building: Servo, a new browser engine. Then go with Rust, just choose Rust, or plain C/C++ for that. I've made the mistake of "fanboyingly" choosing Go for this kind of task and it hurts, it's really stupid and inappropriate, even though Go can definitely do some, it's awkward.
On the other hand, if you want to do something like writing a tool, a server, a web application, a network application or an application to process, send/receive something or whatever that is called high-level. Things that previously people have to use such slow and unsafe scripting languages like Python, Ruby or PHP to write. You don't care about GC, you don't care about memory management, lifetimes and all that stuff, and you shouldn't care because Go is a compiled language which is more than fast enough to do ten times the work. You just want something simple, fast, compiles instantly and makes your code the easiest to read, to understand, to cooperate and to maintain. Choose Go, for the love of god choose Go because it's awesome for the job.
One more thing I want to say: I've made of mistake of being such a fanboy, choosing that language I love for unsuitable tasks. And that's the worst thing. There's no perfect language, there is no best language. The best language is "choosing the right tool for the job"."

Comments

Popular posts from this blog

Apple's evaluating a new JVM

Tuning ext4 for performance with emphasis on SSD usage