1
6 Comments

Is Rust worth it compared Golang?

I've been studying Rust from the community book in detail over the past two months, and I'm close to finishing it. However, I'm left with the feeling that Rust 's tradeoffs aren't quite as worth it compared to Golang's. For those here that have experience with both: which language did you learn to appreciate more, if at all? I know it may be apples and oranges and it all depends on what you're doing with one or the other. In my case Rust's support for WASM and lack of a GC seemed to be a better choice, especially since Golang 2 is still not even close to being released. I don't want to start a flame war, I'm just looking for educated opinions on each language's tradeoffs. Thanks!

posted to Icon for group Developers
Developers
on May 5, 2020
  1. 2

    You need to consider what you are looking for in a programming language.

    Mozilla developed Rust as a systems programming language (and still developing). Naturally, Mozilla borrowed a lot of inspiration from C++ when developing Rust. As such, Rust can be thought of a batteries-included language where problems are solved with new language features. The benefits to this approach are less dependency management, but added complexity in terms of the language itself.

    While at Google, the creator of Unix, Ken Thompson, co-created a general purpose programming language we know as Go today. Clearly, the creators developed Go to be a non-batteries included language and preferring to be explicit over implicit. Therefore, Go has an incredibly small syntax set making it easy to pick up and use. I honestly wouldn't worry about things like Go 2 because this deliberate, slow pace seems awfully similar to the C programming language. This is probably for good reason as simplicity always seems to win out (like C's longevity).

    So I would encourage you to ask yourself things like:

    • How stable do I need my runtime to be?
    • Are Rust lifecycles and reference counts worth the time spent?
    • Does Golang's GC really impact the performance of your runtime?
    • Do I need to build for a microcontroller?
    • Do you need WASM to build a business?
    1. 2

      Nicely put! My answers for each bullet point would be:

      1. Stable.
      2. Personally, yes, but not for my end users.
      3. Personally, yes, but not for my end users.
      4. No, not at this time.
      5. Yes, for what I have in mind.

      So based on my answers, Rust is worth it for the work I will be doing, but not for the end users, whom could in theory use Golang instead. I like that you bring up Thompson because C was made to build Unix and I often think of that in my respect and work I'll be doing. So I may end up working with both Rust and Golang.

  2. 1

    Here are my two cents: Rust is an absolutely awesome language imo and is by far one of the most exciting(if not THE most exiting) language(s) to come out in a very long time. But it has some drawbacks to it. One is the absence of a community, ecosystem and really jobs which is what is needed to drive a language. Basically all the things that Go does have. And go is also a language I really enjoy.

    If jobs are your priority, then go is the obvious choice. As a learning experience and potential however, Rust is far superior and I'd rank it at similar levels to C or C++ in that aspect. But as I said - small community, tiny ecosystem, no jobs. IIRC, the only company that uses rust extensively is Signal.

    1. 1

      Hey, it's interesting to get your opinion in 2 years time.

      1. 1

        Interesting. First difference is my general take on Go. As time passed by, it went from language I tended to enjoy, to a language I REALLY dislike. But as far as rust goes, things are largely unchanged. I still think the community is horrible: Ask a genuine question on how to do something, and you will get 20 replies on how not to do it, and not a single one telling you how you should actually do it. I know several people that work with rust full time, and while they will crucify me for saying it, they use it because:

        1. They called the shots.
        2. Because they wanted and not because they needed.

        And this is the vanilla rust. It's magnitudes worse when it comes to embedded rust.

        Overall rust was meant to be a modern, C++ with creature comforts built in. But C++ developers are insanely conservative: anything new is considered "witchcraft". And with the appearance of carbon, it will likely get more fragmented. I recon carbon will take over since rust cannot compete with google's marketing

        1. 1

          It's sad to hear about your bad experience with Rust community. From my point of view, Rust became more comfortable to work with - better support in VS Code, async, etc. I'm using Rust for almost all (micro)services in my current startup. Agree, the main reason because I'm enjoying it, but from practical prospective Rust gives me apart of performance and less cloud resources - more stable system in whole, because once compiler succeed - all works as expected. But, agree with you that Rust could be much better that it is now.

Trending on Indie Hackers
Your SaaS Isn’t Failing — Your Copy Is. User Avatar 61 comments Build AI Agents & SaaS Apps Visually : Powered by Simplita ai User Avatar 30 comments The Future of Automation: Why Agents + Frontend Matter More Than Workflow Automation User Avatar 24 comments No Install, No Cost, Just Code User Avatar 20 comments Let’s Talk: What’s Missing in Today’s App Builders? User Avatar 17 comments 15 Years of Designmodo User Avatar 14 comments