Rust or Go for my next project? WHAT TO CHOOSE? (as a senior intern engineer)

preview_player
Показать описание
Hey! What should I choose, Rust or Go? This is my experience and my thoughts on this and they are likely to change :)

### Editor

### Sweet Hooooodie

### Links

#vim #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

If you like this comment, please hit the like button. it lets me know you like the talking commentary as much as other videos. Thank you very much ya algo

ThePrimeagen
Автор

Language doesn't matter, as long as you're editing it in Vim.

mgdotdev
Автор

I also had same problem couple months ago. Knowing already Node+TS & Ruby on Rails my tech stack didn't include performant multiplatform any-purpose language that didn't need installing any runtime libraries to execute it. Had to choose between between Go and Rust (I didn't want C++).
After some pros and cons I've choosen Rust. It took me like 2 weeks to finish rust book (couple hrs a day) and many small projects to "feel the language" as it was my first low-level language, and understanding ownership, smart pointers first ever seen or raw multithreading with Arc Mutex and other "features" wasn't the easiest and other languages experience didn't help much with more advanced things. But couple months later (not focused on Rust, but used on some projects) I feel very natural writing Rust, and I don't regret my decision.
From my observation Rust are much more multi-purpose tool than Go, I see Go mostly focused in webservers and microservices but there are not that huge community around other things like: Game development, Machine Learning, Crossplatform desktop app (Tauri) etc. many of them aren't production-ready but it's still growing. Also another thing is ATM for GraphQL Rust seems to be more attractive. Rust also gave me other look on "how other languages I use works under the hood". Also Rust compiler does great job here preventing most errors (other than logical) so when you'll manage to compile your code it'll likely work and won't crash. After learning Rust I've also took some time to learn about Go to see if I've missed the mark... aaand I didn't. Surely often I've used less code to accomplish same things but I've had runtime errors that almost doesn't exist in Rust even if you are beginner, maybe it's caused by libraries I used but sometimes it lacked types completion, I also didn't like way of structuring project to make every project package, Rust is much better here for me, and I'm sure that code maintenance are much better in Rust and it needs much less tests. Only thing I'm missing in Rust are Go compile time, even tho I'm using MBA M1 or I9-10900k PC it's noticeable and are the biggest pain of Rust for me at the moment. For less explicit and performance hungry things I prefer using things I know the best: NodeJS or (if possible by 3rd party) Deno (written in Rust) that can even create executable file to run anywhere.
I don't think Go is bad language, It's great but in my situation Rust suits much better, and when Rust is not needed Node is enough. But if someone don't know any language knowing both are great combo. And I don't recommend Rust as first language to learn. Better first learn any easier language like Go, Typescript or Python to understand what's all about then trying yourself in Rust.

Sky_ye
Автор

I'd argue learning Rust is kind of like learning C, in the sense that it teaches you programming fundamentals that you'll be able to translate to any other language you learn. It has definitely made me a better programmer, though I agree it's tough finding a job where you can do Rust.

EDIT : I use vim everywhere

lucgeorges
Автор

Our company ...is now using Rust in production, especially embedded ML (inference side). I must say ...Man its one of the finest programming language humans ever discovered .

MrAnandml
Автор

I wanted to say "you should learn Haskell, because side effects are for losers"

but then this video was very wholesome and earnest so now I don't know what to do

worgenzwithmz
Автор

I love Rust so much, but solid advice about go. For personal or helpful side projects I always find myself turning to it. But I can't argue that if you only have the time to choose one, currently as it stands, Go is the option that the market wants right now.

calder-ty
Автор

This was a crucial conversation that was significantly needed, even to this day i question my quest to learn rust. I have a long history with Java and python so I should have definitely learned go for it’s simplicity but I loved rust speed so I gave it a try and I guess I’m surviving.

SquidwradThomas
Автор

I had a feeling it would be go overall w.r.t to current situation. Can't wait for GO/Rust comparison video Prime!

earthling_parth
Автор

Thanks Prime! that is good advice and that is a good way of looking at things.

kylewoock
Автор

I've been working with rust for six months and I must say I wasnt really into it in the beginning, the learning scale is steeper than a wall and it can be frustrating. Once you get the hang of it though you start to appreciate all that it has to offer in terms of compile time checks and memory management. Rust coupled with a decent test suite makes it very hard to have runtime errors. On the other hand I think go is by far gets you the most value per time spent learning between the two and in terms of compile time leaves rust in the dust which is a God send if you're into tdd.

edoardocostantini
Автор

I don't know if you should be creating YouTube content for programming or stand-up? But your hilarious and entertaining! At the same time, you provide very informative content, thank you.

DevlogBill
Автор

I will say whilst I've been looking for jobs this summer in 2022 I've seen a lot of new Rust jobs popping out of the woodwork. It's been a genuine suprising amount. There's fullstack frontend leaning roles that use Rust. There's been junior Rust positions I've seen that don't even require strong Rust skills. I've seen crazy junior software engineer positions in fintech using Rust for £80k+. HOWEVER, definitley more GoLang jobs out there but hey, watch this space. I think Rust is really snowballing with it's adoption.

levantos
Автор

Been learning Go for the last six months or so, always nice to hear positive reinforcement 🥳

nodidog
Автор

More videos like that! Love the opinion, didn't know what to choose, started learning rust, but man :D

fixer
Автор

i appreciate this video and the comparison. useful advice for how to consider this choice

ausd
Автор

ok you got me with the discord argument hahah.
love your content!! I hope to eventually learn both

salamander
Автор

Rust is an awesome language if you like to know WHY things are they way they are. The burrow checker will tell you why you can't do something. The compiler will give you smart suggestions on how to write working code which is also nice.

jonathancamarena
Автор

Thanks for the video. I'm programming now for more than 20yrs with first setting up and using linux(and doing the distro hopping until now, but settling now on debian) in '99 at 10 to recover some falsy partitions on a disk and using win95 to mainly fuck around in the registry keys to change folder colors and from there on to study physics(learned C in a course at university and later python and also was doing fortan77-/95 for the BA./Ma.Thesis on a parallel clusters for computing black holes and gravity fields) .

I now mainly do connect old-/new-production machines in the industry and also doing mainy cloud, full-stack apps for data-science of the things happening in production for these machines in different companies. I even had my fair share in further education in blockchain techs. and implementing some concepts in the production industry (IBM-hyperledger, solana-stuff and even with ETH-layer 2-stuff...)

Anyway I'm not getting to the point and just wanted to set up some context. I tried to learn GO but I could just not justify why I should learn GO when there are so many other languages, frameworks and libraries which one can use. I hate Java or Kotlin, but couldn't I use them instead of GO? Does the simpler syntax justifiy all the black magic going on in the back?! I'm not too well versed on these topics because I wanted to avoid them. (Sorry, your main point of telling former yourself was not being ignorant about other peoples work and framework. I fully understand but I want to exclude the java-ecosystem from this!).

I started to learn about Rust 4 years ago, started to get a little bit comfortable to write production code about a year later and since then I still don't fully grasp the language as a whole(macros, atomics, etc). I implemented projects on embedded IoT-projects, robots, backend-services and even simple TUI-stuff. I still don't feel very sure that my code just works, but one thing is clear.

I had never, ever encountered a bug, which was not a logical mistake by me or the team in production. All these programs written in Rust were fast, never gave an unexpected output and never shut down or failed in production. I never experienced such stable programs running in production. In the very, very rare case something panicked or terminated, it was because of a programmer's 'wrong' logic.

That's why I really see rust taking up a prime spot in the future for reliable 'stuff' working in the background of everthing else.
It starts with the linux kernel modules extensions as we saw some time ago and I hope we will see more things coming from this.

I even have some programs written in fortan77 which are less accurate, slower to execute and many more times much more complicated to understand than rust code(don't get me started on subroutines...).
Rust beats these 'heavily' optimized fortan programs in my limited empirical experience by sometimes 15% less execution time.

EDIT: Sorry, I forgot to add: English is not my native lang. and I fucking love Rust-Apps in Production! It's so great to never see a 'Segmentation fault'

heXan
Автор

Last year i hired in a company which mainly uses go. I was a bit concerned if it would be the right fit for me (mostly done python and java before)... I am now absolutely loving it! Migrated all my sideprojects to go.
Even some cli tools. Cobra and Viper are awesome libraries for that.

yannickpeter