Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Go vs Rust : Which one is better and why

Avatar for Emily Emily
February 18, 2020

Go vs Rust : Which one is better and why

Go vs Rust is one of the most debated comparison topics presently. Know the details of the difference between Go and Rust and how they stack up against each other.

Avatar for Emily

Emily

February 18, 2020
Tweet

More Decks by Emily

Other Decks in Technology

Transcript

  1. Deemed as one of the Machine Learning languages’ extensions, the

    aim of this language is better security, performance, improved parallelism, and greater modularity. Rust Programming Language
  2. • Amazing run speed Advantages of Rust • Enables features

    like rich patterns, syntax extensions, and novel embeddings. • Zero-cost abstraction • Predictable runtime behavior • Saves crashing, debugging time.
  3. • Learning Rust is steeper than Go. Disadvantages of Rust

    • Between Go vs Rust, it is slow to compile • It is slower than the C and C++ languages in analogous conditions.
  4. Go language specification was devised to introduce garbage collection, dependency

    management, built-in concurrency, robustness across multiple boundaries between the components, etc. Go Programming Language
  5. • The best feature of Go language is the incredible

    speed at which it compiles to machine code. Advantage of Go Language • The simplicity of code. • Concise, pragmatic, and efficient. • Flexible and highly concurrency favoring. • Strong interoperability with C language.
  6. • Keeps simplicity over performance. Disadvantages of Go Language •

    Lacks the generics to an extent. • Not enough immutability. • Not a system language.
  7. Go trades runtime speed for convenience, by making tasks automatic.

    But in terms of Rust vs Go Performance comparison, the mobile app development speed of Go falls behind the high performance that Rust offers. Rust vs Go: Performance
  8. Rust makes use of a compile-time ownership strategy for memory

    management through zero-cost abstractions. Like Rust, Go is also memory safe, but it is handled automatically during the runtime. Meaning, developers won’t have to think of releasing or allocating memory when writing code. Go vs Rust: Memory Management
  9. At times, the development speed weighs more than the program

    speed. The simplicity and directness that Go offers, makes it faster than many languages in the market. Whereas, Rust’s compile speed is slower than Go’s. Go vs Rust: Development Speed
  10. While concurrency was built into Golang’s syntax from the beginning,

    Rust recently gained the native syntax in the form of async/.await. Though concurrency of Rust lacks the developer experience that went behind Go, it makes up for it via Rust’s memory safety. Rust vs Go: Concurrency
  11. Choose Rust when: Conclusion 1. Performance is a necessity 2.

    Want to interoperate with C language. Choose Go when: 1. Readability is a must-have 2. Want to write codes faster 3. Focus is on uniformity and simplicity.
  12. For more information on this topic, please refer to this

    blog: Go vs Rust: Which is Better and Why?