#Should I main rust or go?

31 messages · Page 1 of 1 (latest)

frozen relic
#

I love both rust and go and have very good experience in both. I have put 6 month of work into rust and 1 month in go. I want a language that is fast to program and makes kinda safe and fast code. Please tell me what I should do. Thanks!

winter moth
#

fast to program: go wins
safe and fast: rust wins for both of these

agile basalt
#

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.

winter moth
agile basalt
#

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

agile basalt
# winter moth rust wins in safety as in: 1. Go has a bunch of apis that only account for the 9...

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.

latent cargo
#

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

agile basalt
latent cargo
#

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

agile basalt
#

Rust isn't perfect for everything. Sometimes Python is better choice, or who knows what else. Decide based on needs and circumstance

latent cargo
#

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

latent cargo
#

Go is a better Java / C#, while Rust is not.

frozen relic
#

Thanks yall

frozen relic
arctic wadi
arctic wadi
#

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

frozen relic
#

Thanks guys, @everyone I will be using rust from now on!

arctic wadi
#

try both and just see which you like most or just continue doing a mix

frozen relic
#

That can work too!