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
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 .
I agree, I work in embedded systems that monitor power grids, and we are switching to Rust for our newer systems and for our terminal driven testing tools. C/C++ is a fucking nightmare, and Rust is a beautiful work of art.
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.
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
good. vim is the best but the c thing, unsure about that. c forces the fundamentals whereas rust has a lot of the feelings of ahigher abstraction where you don't really know what is happening.
@@ThePrimeagen maybe fundamentals isn't the right word for Rust, rather concepts that are useful. I picked up the language when I was already somewhat experienced as a dev and have found the way you think about coding when writing Rust personally very useful!
@@lucgeorges4360 We had to learn c in the first semester in uni and the final exam was all about pointers. Before I just knew some python, I learned 1000x times more about computers in a month.
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.
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
@@JeffsterProductions I got to say Cardano ships, though they did regret choosing Haskell at one point. Evan Czaplicky also ships.. when he pleases, which is just being badass. Richard T. Feldman somehow successfully had his company's Java back end completely substituted with Haskell. These are but the ones I'm aware of.
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.
Yeah, compile time in rust is somewhat bad. But OTOH, you don't really need to compile as often. rust analyzer or cargo check is enough, until you have to actually try out your program, after a while. Because of the compile time checks that you mention.
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.
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.
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.
For someone who just wants to learn and isn't restricted by time or money, I would say Rust is a better choice. Rust is hard to learn because Rust is fundamentally different from pretty much any other language, and forces you to understand your code on a deeper level. Time invested in learning Rust will pay off even if you don't end up using Rust, because concepts like reference pointers, stack vs heap allocation, mutability vs immutability, and algebraic type systems are useful in virtually all languages. Languages that hide these details from you make it easier to go from project idea to a working prototype, but they aren't going to make you a more well-rounded computer science expert, and they won't help you when these abstractions fail and you have to fix a dangling pointer or deadlock condition in your code. But yeah Go will get you a job way faster than Rust. And sometimes you gotta prioritize paying the bills.
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'
i went with rust and the crying about the borrow checker, then async in that order is shockingly accurate. rust has forced me to become a better developer and i now can work with the borrow checker and async much more easily. i actually got to the point where i don't conciously realize the borrow checker is there anymore except for the occasional mistep when i try to get an immutable reference to a mutable var or something similar
I agree with your advise. Coming from C++ I love Rust buuuut the simplicity of Go is unbeatable, so yuo can have something working in no time plus the runtime speed of Rust is not necessary on every domain.
yeah. i literally have spent a lot of time creating web servers now with rust and have yet to successfully create one that _really_ performs well. its actually really hard.
@@SkullTraill potentially yes!, but that "blazing" performance of Rust like I said before I think is very niche, from the top of my mind, some trading algorithms, high performance proxies ala envoy, things like that, the same applies for C++. I have seen lot of code written in C++ which could perfectly been written in go or java because the raw performance of C++ really was not needed.
I mostly use Go for APIs, automation and stuff like that, I do use Rust for controlling hardware/SoC boards and the peripherials attached... where Rust is a lot more suited for in my opinion than Go.
I don't know if you should be creating RUclips content for programming or stand-up? But your hilarious and entertaining! At the same time, you provide very informative content, thank you.
Solid advice for learning a first language. But if you already have a job as a dev, the next language should be purely based on your passion. Since you already know a language that you can get a job in. Learning a language purely based on how easy it is to find a job in it right now will only hurt you in the long run.
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.
Companies, in general, need something that can write POCs and MVPs fast to show clients and put into the market. The least they need is a language for which you need to spend a week to learn to write a for loop.
I'm in my first year of uni and I feel like the rust book is just such a great resource about a lot of good to know concepts in general. The rust job situation will hopefully be better by the time I get out of uni.
This is very true. I've graduated in computer science 15 years ago and while I was lucky enough to be taught C++ by a great teacher and reading good books, still nothing compares to the Learn Rust book. With over 20 years of programming experience, I'm currently reading the book to learn Rust and I feel like I'm learning a lot about programming in general. One of the great aspects of Rust and this book is that you'll get better at programming in general, no matter which language.
For learning, there might be value in learning both at the same time, building the same functionality in parallel. You will get stuck on different things in the two languages. That might seem bad as you'll get stuck twice as much and obviously do more work but 1) when you get stuck on something in just one language but can build it in the other, it separates the design problem from the language problem, once you build it in one language, you understand it better and know what you need to figure out in the other language 2) you can always switch to whichever feels more fun in there moment, which feels like skipping class, and helped you keep motivated, particularly if you are a bit ADHD
I think rust currently has a niche advantage over Go when it comes to web assembly projects. With that being said web assembly is really hard to work with as your project grows in complexity. It feels that new useful features are landing everyday plus as the project grows there is no best practices or structure.
I learned C a while ago to do networks and later on to do a graphics engine. It's funny because recently I dabbled with go and rust. For me Go seems like a weird mix between python typescript and C where you can use if for microservices and api's and tends to be easier and faster to use than C# and Java. Seeing Rust it, the little I've seen, looks like a mix of python, C and C++ but where a it's a more tilt towards the C languages and it's good for more low level stuff a.k.a linux kernel dev, game engines from scratch, microprocessors maybe? I did an API with Rust in actix, not fun at all, I'm doing another one in Go waaaay easier to pick up. Long story short, there isn't and will never be a language that does everything therefore learn languages that are proper for your project.
Yes, rust is better for things where you would use C/C++. But the problem is that C and C++ were designed without focus on robustness and safety. Rust's safety, maintainability and robustness is better than almost any language out there. Go can get a task done quicker but its going to perform worse and be less robust.
I'm hella (yeah I said it) into BJJ and wanted to both learn a new language and make a simple diary style App. I'm a Ruby/JS guy and decided Elixir would be nice to learn. The App likely would've taken 2-3 days with Ruby & JS to get something very usable. I'm about 21 days in and have nothing usable. Elixir has so much worse documentation and guides and tutorials than Ruby/Rails/JS. So yeah, community is huge when learning and perhaps sometimes it is worth just banging out a working prototype so you can get a tool/app you want/need and then moving on to redoing it in the language/framework you want to learn :P
How to choose a language: 1. Pick your favorite mascot 2. Buy all the swag and stickers 3. Grab a dubious benchmark and vociferously claim superiority over X-lang. 4. Repeat when cool new mascot appears
Dude, number three is such a common thing I see. I cannot tell you how many people try to say what's faster than something else. They are full of shit and they have no idea what they're doing
Yes, I am crying in Async a bit. I haven’t cried in the borrow checker yet, because I have been ignoring the parts that I haven’t needed. I started learning Rust by following Peter Shirley’s Raytracing in One Weekend, and that is very simple programming, it’s more computation than anything. It was working perfectly until I got to a point where I noticed that something is wrong in my math, so when I move either X or Y in an object the same happens. I still haven’t found where the problem lies. However, I’m doing other small projects in Rust now, and that’s where I’m using async.
yeah async is a beast. but you should already be in and potentially through the borrow checker then :) if you can assign vars and move them around and never have to worry about how to do that, then you have made progress. the last piece is the lifetimes, but even i don't have the best grasp of how to do use &str throughout the program and cause minimal copy yet (working on it).
@@ThePrimeagen yes, your last paragraphs is where I'm at. I kinda know how everything works, but don't have a solid grasp of it. Sometimes the compiler or IDE say something doesn't work, so I rework it until it does, but don't totally understand why. Going over this is my next step.
I'm using rust for the first time right into my startup, specifically for one module, I'm the only person allowed to touch it, and it is going pretty well
I'd like to be hired in some nice company to build my experience in programming since I whole my life was a Linux Administrator (just average by the way) and wanted to do more creative work. Programming was my dream job since I can remember. Even if I had to work at McDonald's to survive I will code everyday overtime to be alive ;) Cheers!
Hmm really good points, thx. I choose Rust cause JS is my "bread and butter" but I like to dream high and build awesome stuff out of 'nodejs' scope while also learn system programming ;)
I dont think expectations to be hired should be based on the number of positions available. Actually there is a big deficit of technical workers and strong demand persist in every segment. Ruby is a language that got to its peek years ago, and its far of getting back to the game any time. Still you can find pretty interesting jobs and very well paid. That is because even if being a small ecosystem they still need lot of programmers and Ruby world tends to be very exigent in terms of software patterns. Learning a language like Python can led you to many more options than Ruby, but you enter in a more diverse world where knowing Python is only the top of the iceberg, not to talk about the thousands of trash positions where no skill is demanded and the need to fill a slot creates a terrible position for anyone who wanta to grow and learn technology. Focusing on your interests in a specific technology niche is the best way to get a career. If you think learning go is the best way to build any specific kind of stuff and you can be good at it, go for it, sooner or later job is going to happen. Trying to do what everybody does is not going to put you well in any application as you will have to compete with people that are really good at it because they focus on their skills. If you find Rust interesting because you bet is going to be optimal is some kind of task youre good at it sure its that jobs are going to happen, its already a solid language and many companies are adopting it.
not too sure about this statement. if you love doing Haskell, that is great. But if you focus on it, especially as someone trying to find a job, it is going to take you significantly longer than just doing the "right" language. the world is not just about ideas but practical tradeoffs. You love rust? Great, so do I. Its hands down the best language for certain tasks, and that is a rarity to have in our world. But I wouldn't go into it thinking I can get good and just get a job and get paid for it. It will be a hard row until I get hired. But I do agree with the idea that you should focus on "what" you want to be doing with your career. That is a very reasonable position to take. Which should lead you to picking a language that is great for that if you wish to get hired. Which should lead you to go or typescript unfortunately in most cases.
I fully agree. Go is a great language and it's perfect if you want to land a job. I was recently hired as a main dev to aid in the migration of 2 applications from a python backend to Go, because they ran into pretty crippling performance issues. But as a personal side project I've been learning Rust and found it to be very pleasant to write. It has some very unique things about it, but it's fun to write, unlike C++ which I never really enjoyed too much.
Would Go be a good choice to start building applications in to become a full stack or backend developer? I'm currently a data engineer using mostly SQL and Python. I'm learning JavaScript, HTML, CSS as well. I hear a lot of people say learn C#, Java, or Node Js instead of Go. I was hoping to get the pros and cons of learning Go for Backend/Full-stack development from some experienced Go developers.
Primeagen, thanks! I code mostly for myself and I hate everything which needs a GUI (so web is not in for me) and love CLI/TUI tools for my Linux machine(s)
I know many languages (C++, Rust, Go, Haskell, TypeScript, JavaScript, Python, C#, Java, Clojure) and have expertise on Modern C++ (I know its intricacies). So I didn't find much difficultly learning any language including Rust... and well even Haskell (though it's quite different). My advice is: learn Go and use it by default. Think of it as better JavaScript (or TypeScript, though TS is more expressive) or typesafe Python. But if you need speed and work in memory constraint environment, then use Rust, or C++. So it all depends on the use cases. If your problems can be solved using Go or TS, then prefer that. Do not use Rust just to show off! Rust is definitely more expressive and safe language though!
@@ThePrimeagen Yes. That's true. That is why most problems people solve can be solved by Go/TS/Python etc. I dont prefer Python though for big problems. I like statically typed languages more.
If you want to get RSI choose Go! If you want to paralyzed by the sheer number language features and not get anywhere with the actual project choose Rust. See so easy to pick.
@@ThePrimeagen I think it goes both ways. I think when you learn a "niche" language it also open doors that you might not have otherwise. I got a gig at PepsiCo primarily because I knew Elixir. I think if they were hiring GO devs the pool would be so large it would be much harder for my resume to get noticed.
I'm doing Rust. But then, I'm basically retired, it is for fun. Because it is close to the metal, like C which is my first love, but addresses the wonderful dangers that C had.Has. I'd give Go a go, but if I'm going for another language, I really can't go for too many so I'll go for rust.
this is why i love rust. I started in c -> java -> javascript -> java -> typescript -> java -> c++ -> typescript -> c++ (again sadge) -> and now rust but its such a narrow market and very few get the real chance of using it.
@@ThePrimeagen Paper tape machine code -> Nova assembler -> PDP RSX11M -> Fortran -> Algol (ah! getting there!) -> C -> C++ -> Java (tee to javascript, CSS, a derivative of Basic called Nodal, freaking hell, and my own language, called Glish) and now java and rust and a wee bit C. I'm content in my retirement. Glish is being resurrected. It is funny. Thanks for the laughs, prosper.
Was just making this decission last two weeks. Comming from decades of JS, both are difficult. Started with Rust and really liked it. But ended up with Go, basically just because I'm more oriented to web services/apps and it seema like a much better fit. That said, how I *feel* when writing code .. Rust wins. I like it more. Also I find documentation and othwr resource for learning Rust much better than Go.
every part of this is very true. rust feels better go just does it better I am going to try my 5th web server with rust shortly and make this damn thing work, but its very hard.
You should follow demand. If there's more jobs for Go, then the demand will be lower, less salary value. You'll find some startups looking for that "new thing" paying you as twice for a RUST dev, and that's because of the demand. There are not many RUST devs out there.
I'm just a hobbyist, been programming as a hobby on and off for a couple of years, taught myself JavaScript, React, etc... Recently, got back and wanted to learn something new, it was between Elixir and Clojure, but then I discovered your channel. I tried a super simple CRUD in golang in the past and found it devastatingly boring because of the error handling, but Rust just feels like a significantly steeper learning curve. I'm not currently looking to switch careers, though, I'd like to pick a language that'll be fun and relatively easy to learn and build projects with. Elixir has got a fine web framework (Phoenix) which is quite appealing. Have you tried it, btw? In the meanwhile, I might just keep on watching your vids rather than actually learn Rust/Elixir/Go :-)))
This is exactly how I feel about it too. There is just a lot for me to learn from rust and about rust. Go mostly just blends in with just about every other language in the C family. It really has no concepts that are really novel to me.
For as much as I like the concept around Rust, I just find it quite verbose. Go is far, far easier to deal with, and as for command line apps, either one is OK for the job. I'd say that Rust would be more appropriate for anything that requires more speed and lower-level programming closer to C/C++.
When a language goes for performance, safety and expressiveness at the same time, it sometimes has to be a little more verbose. You need to learn a lot more to make clean rust code than go code, and it will take longer to get your code to compile. But once it works, rust will perform better, crash much less, and be more maintainable/refactorable.
Zig has the performance, safety and expressiveness. Yet, it doesn't have Rust's verbosity. So, it doesn't really have to have more verbosity to support these features. As for Rust, I love the language, and I have been using it a lot for over a year now, but I can't neglect its verbosity and complexity. As for the crashes and maintainability/refactoring, I think that Go has that covered too. At least in my experience, I don't find that Go apps crash more and are less maintainable/refactorable than Rust apps. They're kind of equal to me. However, I find that Go code is far easier to write and more expressive. But that's just my opinion, of course.
@@geekstakulus zig does seem like a cool language, but since its meant to be a direcr alternative to C and integrate with C effortlessly, its safety guarantees are nowhere near as strong as rust.
@@theroboman727 I do agree with you on this. I haven't really played with Zig that much, but I know that it is supposed to replace C and interoperate with it. My comment was more towards cases where you do need to use unsafe code in Rust, and from the code I have looked at. So, when you have the need to use unsafe code in Rust it is just as unsafe, and less expressive than Zig. This is my opinion, of course. Rust's ownership is, in my opinion, and I believe everyone else's, not only its strongest feature, but also its strongest selling point. However, we should not forget that it only applies to safe code. The compiler does a good job at guaranteeing memory safety, but it cannot guarantee it when we tell it that it should trust us by using unsafe code. It is a great language, but it is not perfect. That is, its memory safety constructs depend on the context. This can be seen in the Servo project, because it does use both safe and unsafe code.
@@geekstakulus I agree with almost every point. A regular programmer pretty much never has to use unsafe code and it should only be a last resort. Unsafe rust is even more dangerous than C/C++ because there is a lot more undefined behaviour. This is because unsafe blocks arent meant to make you able to do whatever you want. Rust's guarantees still have to be fulfilled, its just your own responsibility to do so.
I say you should make one of those 'a day in the life of a software developer' videos, with the hip music, the standard alarm clock and getting up scene and all that, but instead of programming, you have an alice in wonderland tea party with the Go guinea pig and a damn crab. Please.
Why not both? I jest. Both are great languages and tools.. I write mostly rust but also do a few things in Go.. And even the odd bit of python. I do sometimes get tripped up by async.. but, we march on optimise and keep going.
Ever since I started watching your vids.. I realized two things... ( 1.) I have to uninstall vscode and switch to vim and (2) I now find writing JavaScript on the backend a little sus lol
I started learning go as my first language. And before this I have tried many more... Python, r, matlab, js, lua, ... I'm having a blast in go. Everything is absolutely unixy. However, i can definitely see myself learning rust in future as they both seem to address the same general fields of questions and are much more similar in spirit than it may seem.
I disagree with them being similar in spirit. Go is taking a very generic GC'd feature set, and making that go as fast as possible and be as simple as possible. Rust is like, starting from C, making it completely memory safe, and then making it have as much robustness and utility as possible while keeping it at C/C++ performance. The two end up having relatively similar use cases, but because they're coming from completely different perspectives, they have completely different design decisions.
As a veteran C++ Developer (I love it and very intuitive for me) I would chose GO. Because c++ already overlaps almost all areas that rust can fit with performance and knowledge advantage. Besides it has more jobs. But for the rest, I think Go will fill those gaps for me.
There are some sick game engines popping up with Rust, so if that's your forte and you don't mind having to build some things from scratch, Rust. You won't find a job in it yet but you can learn Go, get a job, learn Rust in your free time. You have to crawl before you can run.
I started using rust a month ago and still haven't had any problems with the borrow checker despite implementing some reasonably complex code (including a 2D game). Everyone keeps saying it's hard and that just hasn't been my experience so far... I did read most of the book before I wrote a single line of code though and I'm wondering if this is why? Do most people just (no pun intended) go for it and is this why people think it's hard or are there some hard concepts that I have somehow sidestepped. I'm thinking the former because I skipped reading about lifetimes and I found those really hard until I went back and revisited it in the book and now it's fine because the rules are relatively simple... 🤔 I would genuinely love to hear peoples opinions on this because people keep asking me (when I tell them I'm learning Rust) a) if it's hard and b) how to approach it. I'm trying to figure out how to give good answers which is hard when my experience contradicts everything anyone says online. Thanks! ♥️
@FichDich InDemArsch Firstly, love the username! 😁 Recursive data structure - I implemented a programming language since my initial comment and did have some issues with recursive data but overcame them fairly easily. Complex object hierarchy - can you give an example? Async code - I've done a bit of this and it was fine for my simple use case. I can see how this might be tricky for a more complex system. I will spend some time trying to make my lexer and parser work in parallel - should be fairly complex I think so would be a good learning opportunity. Do you find maintaining enterprise software to be worse than other languages? JS is pretty bad for it IMO and the enterprise scale codebase I've hacked around in (mostly Deno) seem okay for the most part. Any other suggestions for complex/hard parts of Rust would be very welcome if you can think of any? I want to learn and I like a challenge 😁
@FichDich InDemArsch you want people to make a complex object hierarchy in rust? Do you not know that object hierarchies are really hard to refactor and are a mess of managing mutable state everywhere? Rust intentionally avoids that kind of design because its really difficult to maintain.
Rust is amazing. But no jobs. Especially for WASM and embedded programming... I tried so hard to get C++ to work with WASM well... pretty much gave up... embedded programming with C/C++ was always pulling teeth. Rust makes both of those stupid simple. Also, I learned a lot of things about memory management that C++ can only teach you if you use a lot of optional 3rd party tools. Rust just by default springs into lectures on memory management along with copy pastable solutions to each compiler error, this happens with every error... Banging your head against the Rust compiler is like taking a course on memory management at some college. Which is a good thing in my view. Others might disagree.
im going with apl rust is next edit: ended up learning go and rust. rust isn't too bad if you're used to RAII and the concept of data ownership in other languages. rust just makes it a requirement
I have played around with both rust and go, and I did enjoy playing with rust, but I find go better for a lot of things, and coming from ts it is so much easier to use. Also on that outro from the first note I thought there was about to be some knight rider music 🙏
I use Go at work (not doing anything interesting, though). I want to become a big baaaad engineer who works on big baaaaad distributed systems. Is Rust a tool worth learning for me?
@@ThePrimeagen Thanks, Prime! I'll try to build more domain knowledge then, maybe try to find OSS projects to contribute to that would help me work towards my career goals. Keep up the great content!
The only reason this is even a question (i.e. people talk about it even though the two languages have very different use cases) is because we're coming up on another generational paradigm shift. A new language that you "have to know" is about to be crowned. There was a time (generation) when "everybody" basically "had to know" C. Then "everybody" basically "had to know" Java. Now "everybody" basically "has to know" Javascript. The next big language is going to get de facto mindshare for the next decade or two, and every language advocate is marketing and positioning and evangelizing. Because the answer if you're NOT a card-carrying member of the "I love language X" club is, as you correctly point out, pick the one that's suited for the task at hand.
The hard part is sifting through what requires a language to be the one to use. This use. Whatever tool is best for the job is a common phrase people say when they want to avoid doing research and use what they're comfortable with. At least that's what I see frequently. So this was my attempt to kind of clear the air on what I think is a good way to approach how to use each
@@ThePrimeagen I hear ya. I actually have an entirely different objection to "best tool for the job" which is that I hear people say it in a way that strongly implies they're hand-waving issues of libraries/hiring/capabilities of the existing staff/etc, e.g. "we should totally use Haskell, it's the best tool for the job" (apologies to the Haskellers in the room). But I was more commenting on why there's air to be cleared in the first place: Go is aimed dead on at writing backend services. That's its job and anything else it gets used for (e.g. devops applications like docker) is kinda icing. Rust is....not aimed at that, certainly not exclusively. It's surprising that people compare them *at all*, much less all the time, and I think again it's because people are sensing a change in the zeitgeist. There's about to be a new Sheriff in this here town.
@FichDich InDemArsch I have nothing against the JVM though. The language itself and the community is what I dislike. Often, even if you specify you're new to it when looking for answers, you always get a cumbersome answer or recommendations to use deprecated or weird libraries, they asume you're already using what they use, if you ask for a specific answer for one particular library you most certainly will get the "you can do it by running this X code but with foobar library". If you share your code for help and they see a " variable%2 == 0" they will call you out and say "you should be using an EvenOddComparatorFactory to check for even numbers, it's more idiomatic", but turns out the factory doesn't have a static method for that, oh no, it produces an "EvenOddComparator" object, because of course, that class also doesn't have a static method. If Java factories were real factories, we would be facing human extinction by now.
its.. well its hard to make efficient, that is the kicker. its easy to make a cli program, its hard to make a multithreaded application that actually performs well. this is not a design issue, its a mutex's & threads & scheduling are hard issue and go has just nailed it.
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
yes i liked and hearted my own comment
finally some good sales! Your insane, it's like giving away hoodies man!!!
Ok good, more please! Do with Rust what you did with Vim: break it down and tell it like it is
thanks now i've decided
Awesome ❤️😍
Language doesn't matter, as long as you're editing it in Vim.
the truth has been spoken
This is the way. I use jet brains though. That’s my personal issue lol
@@yehudamakarov 🤣🤣
This is the way.
@@yehudamakarov then YOU ARE LOST
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 .
hah, i do think its a great language. but your experience is a rarity
*invented
I agree, I work in embedded systems that monitor power grids, and we are switching to Rust for our newer systems and for our terminal driven testing tools. C/C++ is a fucking nightmare, and Rust is a beautiful work of art.
@@mattwilliams1844 letsss gooooooooo
@@mattwilliams1844 C is a beauty, man!
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.
Thx for elaborate, I'am at step 0. I am choosing between Rust & Go (chose Rust).
@@jsonkody Try both and decide, and take right tool for right purpose
This was a helpful comment. Thanks for the insight !
Ty for advice
hey how about go vs node? specifically for backend web development
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
good. vim is the best
but the c thing, unsure about that. c forces the fundamentals whereas rust has a lot of the feelings of ahigher abstraction where you don't really know what is happening.
@@ThePrimeagen maybe fundamentals isn't the right word for Rust, rather concepts that are useful. I picked up the language when I was already somewhat experienced as a dev and have found the way you think about coding when writing Rust personally very useful!
just learn c
@@lucgeorges4360 We had to learn c in the first semester in uni and the final exam was all about pointers. Before I just knew some python, I learned 1000x times more about computers in a month.
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.
yeah. it does sadden me as i really do like rustlang, but boy howdy, can you get a job in go so easy
Rust is my favorite language by far, but Go is definitely easier to learn. It does what it's designed for fantastically
rust is gonna pass go for sure
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
i'll accetp your joke, laugh at it, and tell you that there are no losers using haskells because no one wins using haskell
There are 2 kinds of programmers: those who ship code to production, and those who use Haskell
@@JeffsterProductions I got to say Cardano ships, though they did regret choosing Haskell at one point. Evan Czaplicky also ships.. when he pleases, which is just being badass. Richard T. Feldman somehow successfully had his company's Java back end completely substituted with Haskell. These are but the ones I'm aware of.
Learn Lisp.
@@ThePrimeagen bro that was harsh lol
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.
One thing I appreciate about both languages is they took testing as a first class citizen. For me, that is the most important thing
Yeah, compile time in rust is somewhat bad. But OTOH, you don't really need to compile as often. rust analyzer or cargo check is enough, until you have to actually try out your program, after a while. Because of the compile time checks that you mention.
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.
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.
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.
For someone who just wants to learn and isn't restricted by time or money, I would say Rust is a better choice. Rust is hard to learn because Rust is fundamentally different from pretty much any other language, and forces you to understand your code on a deeper level. Time invested in learning Rust will pay off even if you don't end up using Rust, because concepts like reference pointers, stack vs heap allocation, mutability vs immutability, and algebraic type systems are useful in virtually all languages. Languages that hide these details from you make it easier to go from project idea to a working prototype, but they aren't going to make you a more well-rounded computer science expert, and they won't help you when these abstractions fail and you have to fix a dangling pointer or deadlock condition in your code.
But yeah Go will get you a job way faster than Rust. And sometimes you gotta prioritize paying the bills.
I pretty much feel the same way as you.
Thank man, I’m that someone 😊
couldn't put in a better way
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'
Your English is great. :)
i went with rust and the crying about the borrow checker, then async in that order is shockingly accurate. rust has forced me to become a better developer and i now can work with the borrow checker and async much more easily. i actually got to the point where i don't conciously realize the borrow checker is there anymore except for the occasional mistep when i try to get an immutable reference to a mutable var or something similar
I agree with your advise. Coming from C++ I love Rust buuuut the simplicity of Go is unbeatable, so yuo can have something working in no time plus the runtime speed of Rust is not necessary on every domain.
yeah. i literally have spent a lot of time creating web servers now with rust and have yet to successfully create one that _really_ performs well. its actually really hard.
So is there really significant performance difference in go vs rust (question is asked by a JS/TS coder).
@@SkullTraill potentially yes!, but that "blazing" performance of Rust like I said before I think is very niche, from the top of my mind, some trading algorithms, high performance proxies ala envoy, things like that, the same applies for C++. I have seen lot of code written in C++ which could perfectly been written in go or java because the raw performance of C++ really was not needed.
I mostly use Go for APIs, automation and stuff like that, I do use Rust for controlling hardware/SoC boards and the peripherials attached... where Rust is a lot more suited for in my opinion than Go.
I don't know if you should be creating RUclips content for programming or stand-up? But your hilarious and entertaining! At the same time, you provide very informative content, thank you.
Solid advice for learning a first language. But if you already have a job as a dev, the next language should be purely based on your passion. Since you already know a language that you can get a job in. Learning a language purely based on how easy it is to find a job in it right now will only hurt you in the long run.
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.
Yes! Cobra is pretty neet though super overkill for most things.
"...what are your goals, what are you building, and Go from there" I see what you did.
hah, if only that was planned
Been learning Go for the last six months or so, always nice to hear positive reinforcement 🥳
yayaya! Its a great language. i love it a lot.
Rust is so fun though, hard not to want to write everything in it.
How did it go? Did you get a job?
I had a feeling it would be go overall w.r.t to current situation. Can't wait for GO/Rust comparison video Prime!
its on its way
Companies, in general, need something that can write POCs and MVPs fast to show clients and put into the market. The least they need is a language for which you need to spend a week to learn to write a for loop.
DUDE you have no idea how much you influenced my decision to learn Go lool :)
that is pretty cool :)
how was the process so far?
I particularly enjoyed the "Go from there" bit.
This is the right choice.
if only i was that smart :)
C/C++ both are Legend how many programming Lang will come no one can beat these two.
I'm in my first year of uni and I feel like the rust book is just such a great resource about a lot of good to know concepts in general. The rust job situation will hopefully be better by the time I get out of uni.
now this is very likely. The amount of rust jobs in 4 years should be large.
This is very true. I've graduated in computer science 15 years ago and while I was lucky enough to be taught C++ by a great teacher and reading good books, still nothing compares to the Learn Rust book. With over 20 years of programming experience, I'm currently reading the book to learn Rust and I feel like I'm learning a lot about programming in general. One of the great aspects of Rust and this book is that you'll get better at programming in general, no matter which language.
For learning, there might be value in learning both at the same time, building the same functionality in parallel. You will get stuck on different things in the two languages. That might seem bad as you'll get stuck twice as much and obviously do more work but
1) when you get stuck on something in just one language but can build it in the other, it separates the design problem from the language problem, once you build it in one language, you understand it better and know what you need to figure out in the other language
2) you can always switch to whichever feels more fun in there moment, which feels like skipping class, and helped you keep motivated, particularly if you are a bit ADHD
I think rust currently has a niche advantage over Go when it comes to web assembly projects. With that being said web assembly is really hard to work with as your project grows in complexity. It feels that new useful features are landing everyday plus as the project grows there is no best practices or structure.
yes, i am very excited for the web assembly sstuff and plan on investigating soon.
I was in doubt between Go and Rust so I choosed Elixir
Interesting choice. I personally would have chose an employment,
Sick burn
@@ThePrimeagen 😮
I agree, Go's major advantage is that it's very simple like C
I learned C a while ago to do networks and later on to do a graphics engine. It's funny because recently I dabbled with go and rust. For me Go seems like a weird mix between python typescript and C where you can use if for microservices and api's and tends to be easier and faster to use than C# and Java. Seeing Rust it, the little I've seen, looks like a mix of python, C and C++ but where a it's a more tilt towards the C languages and it's good for more low level stuff a.k.a linux kernel dev, game engines from scratch, microprocessors maybe?
I did an API with Rust in actix, not fun at all, I'm doing another one in Go waaaay easier to pick up. Long story short, there isn't and will never be a language that does everything therefore learn languages that are proper for your project.
Yes, rust is better for things where you would use C/C++. But the problem is that C and C++ were designed without focus on robustness and safety. Rust's safety, maintainability and robustness is better than almost any language out there. Go can get a task done quicker but its going to perform worse and be less robust.
I'm hella (yeah I said it) into BJJ and wanted to both learn a new language and make a simple diary style App. I'm a Ruby/JS guy and decided Elixir would be nice to learn. The App likely would've taken 2-3 days with Ruby & JS to get something very usable. I'm about 21 days in and have nothing usable. Elixir has so much worse documentation and guides and tutorials than Ruby/Rails/JS. So yeah, community is huge when learning and perhaps sometimes it is worth just banging out a working prototype so you can get a tool/app you want/need and then moving on to redoing it in the language/framework you want to learn :P
yeah, jumping into new envs, especially new envs with new paradigms make it REALLY hard to learn :)
How to choose a language:
1. Pick your favorite mascot
2. Buy all the swag and stickers
3. Grab a dubious benchmark and vociferously claim superiority over X-lang.
4. Repeat when cool new mascot appears
Dude, number three is such a common thing I see. I cannot tell you how many people try to say what's faster than something else. They are full of shit and they have no idea what they're doing
Learn both! I'm learning Rust mainly for wasm stuff and i'm planing to learn Go afterwards
i am excited about wasm.
WTF IS SENIOR INTERN ENGINEER
More videos like that! Love the opinion, didn't know what to choose, started learning rust, but man :D
i like rust a lot, like a lot, its just not great if you are trying change your life :)
Yes, I am crying in Async a bit. I haven’t cried in the borrow checker yet, because I have been ignoring the parts that I haven’t needed. I started learning Rust by following Peter Shirley’s Raytracing in One Weekend, and that is very simple programming, it’s more computation than anything. It was working perfectly until I got to a point where I noticed that something is wrong in my math, so when I move either X or Y in an object the same happens. I still haven’t found where the problem lies.
However, I’m doing other small projects in Rust now, and that’s where I’m using async.
yeah async is a beast. but you should already be in and potentially through the borrow checker then :)
if you can assign vars and move them around and never have to worry about how to do that, then you have made progress.
the last piece is the lifetimes, but even i don't have the best grasp of how to do use &str throughout the program and cause minimal copy yet (working on it).
@@ThePrimeagen yes, your last paragraphs is where I'm at. I kinda know how everything works, but don't have a solid grasp of it. Sometimes the compiler or IDE say something doesn't work, so I rework it until it does, but don't totally understand why.
Going over this is my next step.
I'm using rust for the first time right into my startup, specifically for one module, I'm the only person allowed to touch it, and it is going pretty well
ok you got me with the discord argument hahah.
love your content!! I hope to eventually learn both
hah. i am glad you liked it
I think Rust is a rising star of last year and I believe it will be the rising sun more 5 years ahead 🌞.
this i can totally buy. It is likely that this video can be redone in ~9 months even.
I'd like to be hired in some nice company to build my experience in programming since I whole my life was a Linux Administrator (just average by the way) and wanted to do more creative work.
Programming was my dream job since I can remember. Even if I had to work at McDonald's to survive I will code everyday overtime to be alive ;) Cheers!
thanks a lot, after a lot of thinking I choose procrastinating.
A very classic and time tested tradition
Hmm really good points, thx. I choose Rust cause JS is my "bread and butter" but I like to dream high and build awesome stuff out of 'nodejs' scope while also learn system programming ;)
not a bad approach
Good luck, I also choose rust with actix-web
I used PHP, JS, TS, Go, Python and Ruby in my work. And I can admit, Rust is the best
So you never used Rust, but you admit it is the best?
@@lars-ragnarhaugen577 I use Rust now. That's why it's not in a first list)
@@oliverfoxi What did you use JS, TS for? and what do you use Rust for now?
@@arturfil Javascript for frontend, Typescript for front end. Now RUST for front-end. Can you use Go for front-end? no ? ok :)
@@HermanWillems Really? Rust for front end? Is that really efficient? Comparable? And no there's no Go front end framework but it could be done
I dont think expectations to be hired should be based on the number of positions available. Actually there is a big deficit of technical workers and strong demand persist in every segment.
Ruby is a language that got to its peek years ago, and its far of getting back to the game any time. Still you can find pretty interesting jobs and very well paid. That is because even if being a small ecosystem they still need lot of programmers and Ruby world tends to be very exigent in terms of software patterns.
Learning a language like Python can led you to many more options than Ruby, but you enter in a more diverse world where knowing Python is only the top of the iceberg, not to talk about the thousands of trash positions where no skill is demanded and the need to fill a slot creates a terrible position for anyone who wanta to grow and learn technology.
Focusing on your interests in a specific technology niche is the best way to get a career. If you think learning go is the best way to build any specific kind of stuff and you can be good at it, go for it, sooner or later job is going to happen. Trying to do what everybody does is not going to put you well in any application as you will have to compete with people that are really good at it because they focus on their skills.
If you find Rust interesting because you bet is going to be optimal is some kind of task youre good at it sure its that jobs are going to happen, its already a solid language and many companies are adopting it.
not too sure about this statement. if you love doing Haskell, that is great. But if you focus on it, especially as someone trying to find a job, it is going to take you significantly longer than just doing the "right" language.
the world is not just about ideas but practical tradeoffs. You love rust? Great, so do I. Its hands down the best language for certain tasks, and that is a rarity to have in our world. But I wouldn't go into it thinking I can get good and just get a job and get paid for it. It will be a hard row until I get hired.
But I do agree with the idea that you should focus on "what" you want to be doing with your career. That is a very reasonable position to take. Which should lead you to picking a language that is great for that if you wish to get hired. Which should lead you to go or typescript unfortunately in most cases.
I fully agree. Go is a great language and it's perfect if you want to land a job. I was recently hired as a main dev to aid in the migration of 2 applications from a python backend to Go, because they ran into pretty crippling performance issues. But as a personal side project I've been learning Rust and found it to be very pleasant to write. It has some very unique things about it, but it's fun to write, unlike C++ which I never really enjoyed too much.
Would Go be a good choice to start building applications in to become a full stack or backend developer?
I'm currently a data engineer using mostly SQL and Python.
I'm learning JavaScript, HTML, CSS as well.
I hear a lot of people say learn C#, Java, or Node Js instead of Go.
I was hoping to get the pros and cons of learning Go for Backend/Full-stack development from some experienced Go developers.
Primeagen, thanks! I code mostly for myself and I hate everything which needs a GUI (so web is not in for me) and love CLI/TUI tools for my Linux machine(s)
Sounds like you have some rust in your future
@@ThePrimeagen better there than on my car I guess ;)
After carefully considering this advice I have decided to pick randomly.
I know many languages (C++, Rust, Go, Haskell, TypeScript, JavaScript, Python, C#, Java, Clojure) and have expertise on Modern C++ (I know its intricacies). So I didn't find much difficultly learning any language including Rust... and well even Haskell (though it's quite different). My advice is: learn Go and use it by default. Think of it as better JavaScript (or TypeScript, though TS is more expressive) or typesafe Python. But if you need speed and work in memory constraint environment, then use Rust, or C++. So it all depends on the use cases. If your problems can be solved using Go or TS, then prefer that. Do not use Rust just to show off! Rust is definitely more expressive and safe language though!
these are facts.
most people don't even know what a constrained env is though. Most people that write rust use 30% of the cpu for SPEEED
@@ThePrimeagen Yes. That's true. That is why most problems people solve can be solved by Go/TS/Python etc. I dont prefer Python though for big problems. I like statically typed languages more.
You're my favorite RUclipsr 😂, I'm not sure if I'm here for the jokes or golang
yeah! Thank you :)
Ferris is just too cute to resist! 🦀
If you want to get RSI choose Go! If you want to paralyzed by the sheer number language features and not get anywhere with the actual project choose Rust.
See so easy to pick.
simple
I have absorbed your opinions and will use them to my benefit. Yayayaya
Elixir is another great language to consider for almost anything that GO might be considered for.
yeah... but job market again. its so small.
@@ThePrimeagen I think it goes both ways. I think when you learn a "niche" language it also open doors that you might not have otherwise. I got a gig at PepsiCo primarily because I knew Elixir. I think if they were hiring GO devs the pool would be so large it would be much harder for my resume to get noticed.
clearly next project needs to be done in javascript, it is after all the BEST language in the world, what are you doing prime?
PS: love your videos!
/giphy feelshurtman
I'm doing Rust. But then, I'm basically retired, it is for fun. Because it is close to the metal, like C which is my first love, but addresses the wonderful dangers that C had.Has. I'd give Go a go, but if I'm going for another language, I really can't go for too many so I'll go for rust.
this is why i love rust.
I started in c -> java -> javascript -> java -> typescript -> java -> c++ -> typescript -> c++ (again sadge) -> and now rust
but its such a narrow market and very few get the real chance of using it.
@@ThePrimeagen Paper tape machine code -> Nova assembler -> PDP RSX11M -> Fortran -> Algol (ah! getting there!) -> C -> C++ -> Java (tee to javascript, CSS, a derivative of Basic called Nodal, freaking hell, and my own language, called Glish) and now java and rust and a wee bit C. I'm content in my retirement. Glish is being resurrected. It is funny.
Thanks for the laughs, prosper.
I fought the borrow checker until I learned to love Rust. Now I can't imagine using anything else.
I kinda like Go using it for about 9 months professionally now, would like to try Rust sometime.
same
Was just making this decission last two weeks. Comming from decades of JS, both are difficult. Started with Rust and really liked it. But ended up with Go, basically just because I'm more oriented to web services/apps and it seema like a much better fit.
That said, how I *feel* when writing code .. Rust wins. I like it more. Also I find documentation and othwr resource for learning Rust much better than Go.
do you still want to consider studying rust in the future...besides golang for work?
@@rickdev1922 , yes, I'm sure I'll get back to it as soon as I need a CLI or similar
every part of this is very true.
rust feels better
go just does it better
I am going to try my 5th web server with rust shortly and make this damn thing work, but its very hard.
@@ThePrimeagen love your.content as a programmer for 1 year.. thx
I would love to find more time to learn Rust but I have a nice job with APIs and webservers in Go
its a SUPER fun language, recommend learning it. but that is a totally valid reason :)
You should follow demand.
If there's more jobs for Go, then the demand will be lower, less salary value.
You'll find some startups looking for that "new thing" paying you as twice for a RUST dev, and that's because of the demand. There are not many RUST devs out there.
Thanks Prime! that is good advice and that is a good way of looking at things.
The answer to all my questions in life
good
I'm just a hobbyist, been programming as a hobby on and off for a couple of years, taught myself JavaScript, React, etc...
Recently, got back and wanted to learn something new, it was between Elixir and Clojure, but then I discovered your channel. I tried a super simple CRUD in golang in the past and found it devastatingly boring because of the error handling, but Rust just feels like a significantly steeper learning curve. I'm not currently looking to switch careers, though, I'd like to pick a language that'll be fun and relatively easy to learn and build projects with. Elixir has got a fine web framework (Phoenix) which is quite appealing. Have you tried it, btw?
In the meanwhile, I might just keep on watching your vids rather than actually learn Rust/Elixir/Go :-)))
2:33 and Go from there. Got it chief, Go it is :)
great observation
I was going to learn go/rust more better but then I got sucked into the nix-averse. Now I'm just trying to functionally recreate my i3 setup
hahah! the best part about your free time is that you get to spend it how you like
I'm learning both cuz I'm in it for the fun of it. But, if I'm being honest, Rust is grabbing my attention more. It's just more interesting.
This is exactly how I feel about it too. There is just a lot for me to learn from rust and about rust. Go mostly just blends in with just about every other language in the C family. It really has no concepts that are really novel to me.
I crazily love this kinda content
awesome! That is really great! I actually really enjoy making this kind of content.
the way you said "rust... you know... there's like... No JObS" at 1:27 am dead!! 🤣🤣💀
hah :) the market is rather slim
I made a decision to create a new language GR after watching your amazing video.
For as much as I like the concept around Rust, I just find it quite verbose. Go is far, far easier to deal with, and as for command line apps, either one is OK for the job. I'd say that Rust would be more appropriate for anything that requires more speed and lower-level programming closer to C/C++.
When a language goes for performance, safety and expressiveness at the same time, it sometimes has to be a little more verbose.
You need to learn a lot more to make clean rust code than go code, and it will take longer to get your code to compile. But once it works, rust will perform better, crash much less, and be more maintainable/refactorable.
Zig has the performance, safety and expressiveness. Yet, it doesn't have Rust's verbosity. So, it doesn't really have to have more verbosity to support these features.
As for Rust, I love the language, and I have been using it a lot for over a year now, but I can't neglect its verbosity and complexity.
As for the crashes and maintainability/refactoring, I think that Go has that covered too. At least in my experience, I don't find that Go apps crash more and are less maintainable/refactorable than Rust apps. They're kind of equal to me. However, I find that Go code is far easier to write and more expressive. But that's just my opinion, of course.
@@geekstakulus zig does seem like a cool language, but since its meant to be a direcr alternative to C and integrate with C effortlessly, its safety guarantees are nowhere near as strong as rust.
@@theroboman727 I do agree with you on this. I haven't really played with Zig that much, but I know that it is supposed to replace C and interoperate with it. My comment was more towards cases where you do need to use unsafe code in Rust, and from the code I have looked at. So, when you have the need to use unsafe code in Rust it is just as unsafe, and less expressive than Zig. This is my opinion, of course.
Rust's ownership is, in my opinion, and I believe everyone else's, not only its strongest feature, but also its strongest selling point. However, we should not forget that it only applies to safe code. The compiler does a good job at guaranteeing memory safety, but it cannot guarantee it when we tell it that it should trust us by using unsafe code. It is a great language, but it is not perfect. That is, its memory safety constructs depend on the context. This can be seen in the Servo project, because it does use both safe and unsafe code.
@@geekstakulus I agree with almost every point. A regular programmer pretty much never has to use unsafe code and it should only be a last resort. Unsafe rust is even more dangerous than C/C++ because there is a lot more undefined behaviour. This is because unsafe blocks arent meant to make you able to do whatever you want. Rust's guarantees still have to be fulfilled, its just your own responsibility to do so.
"The little crab dancing song is also really exciting" lol
I say you should make one of those 'a day in the life of a software developer' videos, with the hip music, the standard alarm clock and getting up scene and all that, but instead of programming, you have an alice in wonderland tea party with the Go guinea pig and a damn crab. Please.
too much work, but great idea
thank you, thank yoooou for solving my drying painfull mess!!! oh, thank you! im eat my herring ang go for go!
yaya! Go is great. I must admit rust is simply more fun, but go is just more practical.
hey just found your channrl and im hooked! im hoping to transition from JavaScript development to system level languague
Awesome
Why not both?
I jest. Both are great languages and tools.. I write mostly rust but also do a few things in Go.. And even the odd bit of python.
I do sometimes get tripped up by async.. but, we march on optimise and keep going.
i appreciate this video and the comparison. useful advice for how to consider this choice
Much obliged, this was killing me
you are welcome
Ever since I started watching your vids.. I realized two things... ( 1.) I have to uninstall vscode and switch to vim and (2) I now find writing JavaScript on the backend a little sus lol
Very excellent. I'm not saying it's the only way. I'm just saying it's a darn good way
The jobs argument falls appart if you want to prep for the future job market, rust will be around a while.
GO is a great language to GO get a job
What are your goals? What are you building? GO from there
GO ahead, pick your language
hah.
i do use rust almost exclusively for all my side projects
I started learning go as my first language. And before this I have tried many more... Python, r, matlab, js, lua, ... I'm having a blast in go. Everything is absolutely unixy. However, i can definitely see myself learning rust in future as they both seem to address the same general fields of questions and are much more similar in spirit than it may seem.
rust is a ton of fun, i would totally recommend learning it, but again, depends on your goals :)
I disagree with them being similar in spirit.
Go is taking a very generic GC'd feature set, and making that go as fast as possible and be as simple as possible.
Rust is like, starting from C, making it completely memory safe, and then making it have as much robustness and utility as possible while keeping it at C/C++ performance.
The two end up having relatively similar use cases, but because they're coming from completely different perspectives, they have completely different design decisions.
We use go microservices at work. Works like a champ. Quick to learn.
As a veteran C++ Developer (I love it and very intuitive for me) I would chose GO. Because c++ already overlaps almost all areas that rust can fit with performance and knowledge advantage. Besides it has more jobs. But for the rest, I think Go will fill those gaps for me.
There are some sick game engines popping up with Rust, so if that's your forte and you don't mind having to build some things from scratch, Rust. You won't find a job in it yet but you can learn Go, get a job, learn Rust in your free time. You have to crawl before you can run.
Golang is just amazing
agreed
I started using rust a month ago and still haven't had any problems with the borrow checker despite implementing some reasonably complex code (including a 2D game).
Everyone keeps saying it's hard and that just hasn't been my experience so far...
I did read most of the book before I wrote a single line of code though and I'm wondering if this is why? Do most people just (no pun intended) go for it and is this why people think it's hard or are there some hard concepts that I have somehow sidestepped.
I'm thinking the former because I skipped reading about lifetimes and I found those really hard until I went back and revisited it in the book and now it's fine because the rules are relatively simple... 🤔
I would genuinely love to hear peoples opinions on this because people keep asking me (when I tell them I'm learning Rust) a) if it's hard and b) how to approach it. I'm trying to figure out how to give good answers which is hard when my experience contradicts everything anyone says online.
Thanks! ♥️
I agree, the ownership and borrowing really isn't that hard and I come from a Python background
@FichDich InDemArsch Firstly, love the username! 😁
Recursive data structure - I implemented a programming language since my initial comment and did have some issues with recursive data but overcame them fairly easily.
Complex object hierarchy - can you give an example?
Async code - I've done a bit of this and it was fine for my simple use case. I can see how this might be tricky for a more complex system. I will spend some time trying to make my lexer and parser work in parallel - should be fairly complex I think so would be a good learning opportunity.
Do you find maintaining enterprise software to be worse than other languages? JS is pretty bad for it IMO and the enterprise scale codebase I've hacked around in (mostly Deno) seem okay for the most part.
Any other suggestions for complex/hard parts of Rust would be very welcome if you can think of any? I want to learn and I like a challenge 😁
@FichDich InDemArsch you want people to make a complex object hierarchy in rust? Do you not know that object hierarchies are really hard to refactor and are a mess of managing mutable state everywhere? Rust intentionally avoids that kind of design because its really difficult to maintain.
Rust is amazing. But no jobs.
Especially for WASM and embedded programming... I tried so hard to get C++ to work with WASM well... pretty much gave up... embedded programming with C/C++ was always pulling teeth.
Rust makes both of those stupid simple.
Also, I learned a lot of things about memory management that C++ can only teach you if you use a lot of optional 3rd party tools. Rust just by default springs into lectures on memory management along with copy pastable solutions to each compiler error, this happens with every error... Banging your head against the Rust compiler is like taking a course on memory management at some college. Which is a good thing in my view. Others might disagree.
i do want to do some wasm really bad.
Dlang has a cargo equivalent called dub and an llvm backend. Its kinda like zig took a shower and got a job.
you got a job using dlang? dang
im going with apl
rust is next
edit: ended up learning go and rust. rust isn't too bad if you're used to RAII and the concept of data ownership in other languages. rust just makes it a requirement
I have played around with both rust and go, and I did enjoy playing with rust, but I find go better for a lot of things, and coming from ts it is so much easier to use.
Also on that outro from the first note I thought there was about to be some knight rider music 🙏
there was knight rider music, it was just in your head only.
Concise and clear from the start
as a person with ADHD I appreciate it.
Like and sub
I use Go at work (not doing anything interesting, though). I want to become a big baaaad engineer who works on big baaaaad distributed systems. Is Rust a tool worth learning for me?
Go as you significantly more in these contacts. It's extremely hard to build well built tools that are multi-threaded in rust comparatively to go
@@ThePrimeagen Thanks, Prime! I'll try to build more domain knowledge then, maybe try to find OSS projects to contribute to that would help me work towards my career goals. Keep up the great content!
The only reason this is even a question (i.e. people talk about it even though the two languages have very different use cases) is because we're coming up on another generational paradigm shift. A new language that you "have to know" is about to be crowned. There was a time (generation) when "everybody" basically "had to know" C. Then "everybody" basically "had to know" Java. Now "everybody" basically "has to know" Javascript. The next big language is going to get de facto mindshare for the next decade or two, and every language advocate is marketing and positioning and evangelizing. Because the answer if you're NOT a card-carrying member of the "I love language X" club is, as you correctly point out, pick the one that's suited for the task at hand.
The hard part is sifting through what requires a language to be the one to use. This use. Whatever tool is best for the job is a common phrase people say when they want to avoid doing research and use what they're comfortable with.
At least that's what I see frequently. So this was my attempt to kind of clear the air on what I think is a good way to approach how to use each
@@ThePrimeagen I hear ya. I actually have an entirely different objection to "best tool for the job" which is that I hear people say it in a way that strongly implies they're hand-waving issues of libraries/hiring/capabilities of the existing staff/etc, e.g. "we should totally use Haskell, it's the best tool for the job" (apologies to the Haskellers in the room).
But I was more commenting on why there's air to be cleared in the first place: Go is aimed dead on at writing backend services. That's its job and anything else it gets used for (e.g. devops applications like docker) is kinda icing. Rust is....not aimed at that, certainly not exclusively. It's surprising that people compare them *at all*, much less all the time, and I think again it's because people are sensing a change in the zeitgeist. There's about to be a new Sheriff in this here town.
Dude just found your channel but I love the honesty ❤️
ytytyt! i try the no bullshit approach
Daddy came back with wisdom
now i am going to go get a pack of cigarettes, be back in 15
Go is indeed all the good things of Java without all the bad things of Java, which is almost all Java.
good way of summarizing it.
Go ain't got nothing on Java
@FichDich InDemArsch I have nothing against the JVM though. The language itself and the community is what I dislike.
Often, even if you specify you're new to it when looking for answers, you always get a cumbersome answer or recommendations to use deprecated or weird libraries, they asume you're already using what they use, if you ask for a specific answer for one particular library you most certainly will get the "you can do it by running this X code but with foobar library".
If you share your code for help and they see a " variable%2 == 0" they will call you out and say "you should be using an EvenOddComparatorFactory to check for even numbers, it's more idiomatic", but turns out the factory doesn't have a static method for that, oh no, it produces an "EvenOddComparator" object, because of course, that class also doesn't have a static method.
If Java factories were real factories, we would be facing human extinction by now.
I strongly recommend you to learn COBOL... I don't have to explain why bc we all know why we should learn COBOL
Let’s improve rust so that it’s the win for web apps too. While the learning curve is rough, it’s just more efficient.
its.. well its hard to make efficient, that is the kicker. its easy to make a cli program, its hard to make a multithreaded application that actually performs well.
this is not a design issue, its a mutex's & threads & scheduling are hard issue and go has just nailed it.