#Should I main rust or go?
31 messages · Page 1 of 1 (latest)
fast to program: go wins
safe and fast: rust wins for both of these
The real question here is, what are your needs? If you define that, then your answer will become immediately obvious
If you want the fastest binary possible (ala c speed), then go with Rust. If you are willing to trade speed for ease of coding and don't mind a GC, then Go is quicker to program in.
rust wins in safety as in:
- Go has a bunch of apis that only account for the 90% case in the name of simplicity. Going more robust than that requires much more effort because the complexity is now for you to handle, not the language
- Go doesnt guarantee no data races
I'm not a go person by any means, but I highly recommend to step back and research disadvantages/advantages of Rust and Go and compare them together, and decide which disadvantages you're willing to accept, and which you're not
For example:
- I'm willing to trade writing programming speed for the fastest possible binary, and also compile time error checking which is immensely useful. Rust's error messages are first class
- I'm willing to trade Go's features for technically correct concurrency (fearless concurrency) and 0 fear of data races
- I'm willing to trade Go for Rust's generics and error handling, which are amazing
- I'm willing to trade go for Rust's immensely easy package management system
- I'm willing to trade Go for Rust's super useful macros, both declarative and procedural, which lets me dynamically create code on the fly
And most importantly, these advantages are so useful to me that
- I'm willing to accept the extra complexity it requires
Your list of what disadvantages you're willing to accept or not accept may be different
Of course, if you want a biased opinion, I'll say you should main Rust. But then again, if you ask on the Go server they'll tell you you should main Go ;P
If I have to be blunt, I feel that Rust's entire language design and features is just simply more well thought out and Go's isn't. Everything I do feels like there was meaning and careful thought put into the design.
I get the feeling that the community really cares and has passion (I'm not saying Go's doesn't, but this feels on a different level to me)
And on that note, it makes Go feel to me that the design is more haphazard. Like, so many features were removed for the sake of simplicity that it actually becomes cumbersome. But to some people, that may be an advantage. And to each their own!
I certainly do think there may be some merit in knowing both still.
obligatory rust propaganda: https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-ride
i mean depending on what angle you're looking at it from probably neither
rust junior positions are few and far between
as a language i think you can learn more from rust, but that's because its harder
in terms of ecosystem they both have their own problems
Over and over, every piece of documentation for the Go language markets it as "simple".
This is a lie.
Or rather, it's a half-truth that conveniently covers up the fact that, when you make something simple, you move complexity elsewhere.
This is literally the exact point I was trying to make 😛
yep, its a very good article
as for projects realistically the actual advice is to pick the right tool for the job
imo that will never be Go but its also unlikely to be Rust most of the time
Exactly!
Rust isn't perfect for everything. Sometimes Python is better choice, or who knows what else. Decide based on needs and circumstance
as for growing as a programmer i would recommend languages that are (a) not obtuse to learn and (b) introduce novel ideas about how code should work
but that's secondary to actually doing projects with your programming skill
Go is a better Java / C#, while Rust is not.
Thanks yall
For general backend applications and light system programming
Thanks!
I'm pretty sure i've seen this article get ripped to shreds across the various forums it's appeared on
How?
If I remember correctly for all of the usual points:
- Different intended use cases
- Different trade offs
- Article is very "Can do x which lang cant do" when the lang cant
The article tends to ignore things like the channel footguns in Go, GC behaviour, FFI just not being a thing, etc...
It's the general argument of stop comparing languages which realistically get used for different things
Thanks guys, @everyone I will be using rust from now on!
try both and just see which you like most or just continue doing a mix
That can work too!