Rust — from the point of view of a Scala developer



  • structs without default values — after case classes from Scala, you need a lot of macros to support and boilerplate to do something similar (yet still not good enough). derive(Default) and Default trait aren’t the proper answer for me (as well as in Haskell — the records in Haskell are still killing me).
  • absence of named arguments in functions — you can live without it, but I will definitely miss this (especially because you also don’t have default function argument values).
  • absence of higher-order functions and higher kind types
  • absence of FP primitives/common functions (even something common like Option.flatMap, for example).
  • huge usage and dependency on macros system — they are literally everywhere, and your code is full of #[attributes] (they resembled me sometimes the code written in Java/Spring with a zillion of annotations). I’m not sure if it is a good sign.
  • Safety without compromising efficiency. And this is really impressive how to solved in Rust — unique ownership concept embedded in the language itself.
  • No JVM, no wasting your RAM excessively (and living in the world without Class.forName()surprises, GraalVM workarounds). It is crucial for “serverless” and “microservices”.
  • Having parametric polymorphism (hello there, Go lang), Haskell like type-classes, solid support of pattern matching and immutability first principle.
  • WASM is available for you today (it is still not available for Scala.js/native yet, for example).
  • Many language keywords are short ( fn, pub, mod, types) and thanks gods for that. I still remember function from JavaScript. They are short yet still readable.
  • Cargo tool is easy to use and learn. I published my first cargo with my own macro implementation without any issues on the same day as I started to use it. Not saying it is perfect, but I had been afraid of learning yet another build tool.
  • Compiler error messages — it seems they did a really good job on this one.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store