Rust vs Go : Hands On Comparison in 2024

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's go into this ladies and Gentlemen let's go which offers the best performance which offers the best opportunities which I like his videos by the way kaps Academy I like his videos into all that and more First Let Me Explain how we'll be approaching this first we'll look at the differences in philosophy and mindset between each language second we'll explore the features of both languages and their relative strengths and weaknesses third we'll examine what the statistics say about the difference between the two languages in terms of developer experience attrac and salary very good point I'll tell you what I recommend but whatever language you choose I've provided links in the description to helpful resources for learning them let's dive in what are the differences in philos between the two languages we have our contenders in the blue Corner goes friendly gopher in the well brownish red Corner rust's unofficial mascot Ferris the crab and there you have it dud you're going to get sued the Russ Foundation going to go after you I hope you are linking this to Russ Foundation cabs cuz they're going to sue you now logos names mascots and even color tell us a lot about the differences between the two languages right let's start with Go Go's name and logo Express speed and efficiency the three lines make the text look like two wheels in Rapid motion Go's Mission as expressed by their brand book is to bring order to the complexity of creating and running software at scale a good way to say this bring order is just how can we make this fast how can we get people to write complicated code that does complicated things easier right Rob Pike has said that when at Google all the new generation of programmers did not have a low-level understanding of C or C++ which made it difficult to write efficient software at Google so what Rob Pike and the goang team did was they created a language AKA goang which basically gave people without the most in-depth experience of programming a way to build complex things with go one of his most popular talks at auon 2023 he basically said that the point of go wasn't to create a new language but it it was to give way for developers to write software easier that was the purpose of go if you guys like go this kind of content make sure you click subscribe button it does help the channel a lot a lot of effort goes into these videos and it truly is the best way to support if you enjoy but let's get back to the video Let's unpack that creating and running at scale what does that mean Go's goal is to be simple enough to be used for prototyping and efficient enough to be the language of the cloud Go's brandbook also says it wants to be thoughtful simple efficient reliable productive and friendly vales are expressed in the friendly cudley mascot the Gopher Russ mascot Ferris certainly has a friendly smile but it's prickly though as is Russ logo Russ's goal is not to be friendly or simple after all crabs walk sideways what does that mean wait I don't get that Russ goal is to not to be friendly or simple after all crabs walk sideways what does walking sideways have anything to do with this perhaps the best way to explain rust's values is to tell its origin story Gren [ __ ] was a program at medzilla coming home one night he found an out of service elevator it means you never move forward just like using Russ to make code he lived on the 21st floor the software had crashed due to a memory error this goed [ __ ] into creating a language that prevents memory management crashes okay rust is designed to be solid like the crap and the name rust also conveys this it doesn't refer imagine being such a Chad that you're like huh I have a problem at work instead of fixing addressing that problem and using the existing code to fix it I'm just going to create a brand new language to the oxidation of iron but to an exceedingly resilient fungi now what are the differences and common strengths between the features of go and rust go and rust both focus on memory management on concurrency and performance however their approach is very extremely different concurrency ref their philosophy allow me to demonstrate first let's talk about memory management go has a helpful garbage collector that tries to clean up memory references for you the garbage collector is like the quintessential feature of go it's like one of the main reasons why it's so fast the garbage collector is like amazing rust on the other hand enforces the concept of ownership and borrowing to prevent you from coding memory bugs go helps you rust forces you to do the right thing basically go just takes care of it for you rust makes you do it for yourself right second concurrency and multi-threading in a similar fashion go provides easy to use go routines these are lightweight threads that allow you to write concurrent code without worrying about thread management rust on the other hand uses basically system threads here Russ's ownership concept helps prevent threadlocking errors and data races again I mean you can do the same thing with go you can still like handle go threading with go I wouldn't say like there's ways to handle the threading and go as well with the go routines and uh you know all the feature gives go makes your life easier rust teaches you to do the right thing I disagree with that take go like you can't just slap a go concurrency thread and be like Oh do it for me go concurrency functions are light red are are lightweight are easy to use but they don't do all the work for you do have to still allocate that you can still like block your your communication you can do a bunch of stuff if you're not careful with it you to do the right thing third performance go has a small memory footprint and is optimized for modern multicore processes it syntax is simple and concise this makes it easy to learn and to start working with right go does the right thing for you by default rusts on the other hand provide something called zero cost abstractions basically there is no magic the code that you write Faithfully reflects the code that the compiler produces and vice versa this means less runtime overhead which helps you build high performance applications that's not necessarily true at all like this concept depends on a developer way more you can still write garbage rust code that is not going to be more performant high performance is not guaranteed in Rust if if you don't know how to do how to write High performer code you're going to write garbage rust code there's no guarantee that all because you have a lower level granularity control of your rust code that's going to be better performant than go in short go hides the complexity for you rust helps you understand it by exp it now I agree to that what do developers think of the languages let's look at the I definitely agree with that take that go does hide a lot of the complications for you uh while Russ exposed it to you and force you to learn them sorry my dog's barking again dog what's the bark counter at the statistics provided by the snack overflow developer survey go and Mar have similar popularity levels at about 133% overall among developers developers opinions so 13.24% for go 13.5% 05% for rust of the languages however show a difference 84% of the developers who used rust last year want to use it again this year for go that number is lower at 60% the survey also shows that 30% of those who didn't work with rust last year want to work with it this year that number is 20% for go in short rust is globally more desirable among developers than go but what about on the job market while if we look at the reported salaries developers working in both languages report a mean yearly salary of about $90,000 there's go okay so go is $92,000 slightly above and rust developers is slightly below uh of portion here these values are reported globally the situation in your local job market will vary now after having explored the philosophies the features and the statistics of G rust what are my recommendation okay so a few things before we go into recommendation first of all it seems like he's going to push rust I think he's going to say something that around the lines that like if you're interested in just building something quick and fast and not interested in learning lower level Concepts use go if you are a desirable person who wants to learn how programming Works use rust here's the thing that I think he lacked uh in his last kind of analyses there one the desired trait versus the undesired trait like I think there's a lot more people who use go last year than people who use rust and also I think what would really helped his case not just look at the salary but look at how many jobs are open for those programming languages like how many jobs exist for goang specific developers how many jobs exist for rust specific uh developers so if you go to like indeed.com I think I've done this before how many goang jobs are available all right so go developer we have 3,69 jobs continue on with rust 567 jobs for rust Developers so if we go to like indeed.com real quick right and we put in like rust developer all right sure in the San Francisco Bay Area let's just say that there's 44 jobs okay so there's 44 jobs for rust developer and let's put go developer uh let's see if there's more or less uh there's 231 jobs so go is way better okay so 44 for rust developers versus a 230 for goaling developer which is like almost like a 5x markup which I think should play a factor into deciding or at least putting into the analysis of what language is better if you're doing a go versus rust comparisons well let's recap go is designed to be simple and friendly rust is designed to be as hard as possible to break there two teachers one is encouraging and warm a kindergarten teacher the other is demanding and harsh a drill sergeant one makes life easier for you the other makes you work harder for your own good go and rust also have different primary use cases go is meant for the cloud for Server applications rust is meant for lowlevel or high performance or embedded applications which is the best for you well that will depend on two things who you are and what you're trying to build go is easier to pick up rust requires more effort but provides greater rewards in the long run what kind of teacher do you need do you need encouragement are you building for the cloud well I recommend go do you need a demanding teacher who will push you forwards Do you want to build performance intensive or low-level embedded software I recommend rust whatever language you choose if you're looking to pick up the basics I recommend you go to exorcism which gives you simple challenges to help you learn and if you're looking for projects to help you dive deep while learning how reference Technologies like git Docker or HTTP servers work I recommend Cod Crafters I've provided links for both interesting interesting video I want to add on to his point of you know the drill sergeant analogy right when it comes to go versus uh rust and I think you should put more emphasis on on that so let's say you have goang right and let's say you have something like rust okay I agree with the analogy that rust is much harder to learn much harder to pick up but I think one thing that I like about golang is like going from zero to 100 is super super rewarding it makes coding fun and it's not like too much handh the one thing I did kind of get from that video it seemed a little bias for like go will hold your hand for everything which is not necessarily true like goang does do a lot of things that Russ kind of abstracts I mean the rust forces you to do but I still think go doesn't hold your hand all that much right you will still learn you will still learn 100% now the thing with rust is that going going from 0 to 60 is all right but the 60 to 100 takes a long time uh do do you recommend any go course for a beginner I recommend go resources not courses you don't need a course for go I would recommend like a textbook go by example and other things like that so the 060 takes a long time and I think due to this like it can be daunting and for people to drop for people to drop rust cuz it's too hard and then one more thing is like the job market as well right like the job market for Go versus python would have been very helpful to have with the indeed reference [Music] there
Info
Channel: Melkey
Views: 13,462
Rating: undefined out of 5
Keywords: video sharing, video, sharing, computer science, software engineer, silicon valley, computer programming, coding, learn to code, machine learning, artificial intelligence, cloud, python, javascript, how to code, Data scientist, AI developer, Machine Learning, rust, golang, go, should you learn golang in 2024, should you learn rust in 2024, the best programming language, theprimetime, theprimeagen, best programming language to get hired, rust vs golang
Id: wK11xa5CbG4
Channel Id: undefined
Length: 11min 53sec (713 seconds)
Published: Sun Mar 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.