Yes, all of the concepts you mentioned here are obviously relevant and useful for learning Rust. Certainly knowing about the memory model, the stack vs the heap, etc. However, and I mention this mostly as a note to newcomers who may be discouraged by the sheer number of things mentioned here from learning Rust, that I think it's a mistake to refer to all of this as things you wished you knew "before learning Rust." You can learn many of these things along the way and sharpen your understanding as you go. I wouldn't view everything mentioned here as some hard prerequisite. Often times, when we learn new things, we have a hindsight bias problem where, after having learned all the things, we look back and say "gee I wish I had known these things before diving into or learning X"...but maybe it was totally fine to have learned these things by way of learning X. Sometimes it is actually preferable since learning X provides the context and motivation. Just my 2c
I honestly think starting with a simple app that can be expanded is the best way to learn hands on. This is why web developers create todo's so often, but I think its even more interesting to do for languages with file access like rust, you can start with a terminal todo that is just: list add remove toggle . Then when you feel like you are happy with that expand it, save the list to a file so you can load it on start. Allow the user to save multiple lists and files, and have a default that loads on start. Add colors, add timestamps and due dates and completion dates etc etc. This is how I have been learning Rust this last month and I feel like the hardest thing has been just making sure I'm returning the right data Result vs Option vs String vs str and understanding the Borrow checker in edge areas like when you aren't putting str's in variables (something you do in scripting languages often, in place raw data manipulation, needs a tiny bit more understanding in Rust IME).
C++ was my favourite language for a very long time. I got introduced to Rust through a project at work. After a few pages of the Rust Book, I immediately noticed that I really like Rust and that for me it is C++, just improved with all the things that annoy me about C++. I really hope that we will see more and more Rust in the future and that the language will continue to develop. I don't have much experience with Rust yet, but it has already replaced C++ as my favorite language 😅
For me Rust totally made sense the first day I touched it. After about 20 years of touching many other languages, most things in Rust landed quickly for me. And of course things can be frustrating sometimes and getting things done goes slower, but it's absolutely true that the result is great software. I don't work with Rust professionally yet and jobs even quite difficult to find too as it seems. But that does not matter so much to me. I work mostly in C# which is also a really great language for now. But I have always explored and used far more, including C and C++, and I have actively decided to take Rust very seriously, because I believe in it's future, too important to ignore. That was the main point even before learning it and I am feel no regret.
Jeremy Chone is the best Rust resource in RUclips for backend dev, after you get the foundation knowledge right from the Rust Book and Rust by Example.
I don't think you mentioned it, but I started with the "Programming Rust" book. It's incredibly well-written, and explains Rust concepts in relation to C, so it explains why the concept is an issue in C and is fixed in Rust. This gives you a great understanding of why things are the way they are in Rust without needing to struggle through learning C to appreciate it.
Having only ever written PHP and JS, I definitely feel the mountain of concepts and terminology I've never heard of or had to worry about. It's still fun to just dive in and try things just because the compiler error messages are so insanely good. I will probably never be a "proper" programmer (missing far too much math knowledge sadly), but for what I want to do with it, I'll manage.
I'm working full time as a PHP developer, and I don't need more math skills than basic arithmetics in my day to day (addition, multiplication, etc). If you want to work with AI or other highly advanced stuff, you need that knowledge, but you don't need to be a mathematician to be a successful developer. :)
I'm not a developer by trade, though I do write code professionally in my DevOps/Sysadmin'y work - mostly the MS stack on C#/PowerShell etc. A few years ago I sat down and learnt C to a reasonable standard, it was a tough process but in learning Rust I've really appreciated the grounding it's given me. So much of what people hate about Rust just hasn't bothered me, because it conceptually makes sense. I don't find myself wrestling with the dreaded borrow checker (mostly..) and so on. But, I think had I gone from C# with all its cuddly help and GC I would have absolutely hated Rust. I'm now writing lots of embedded code in Rust and just loving the journey
I was a Python developer for most of my career. Going from that to Rust was tough. I really had to work my brain out of thinking about coding problems from the interpreted language perspective.
I made that journey you mentioned from C# to Rust, and yeah it was just as tough as you'd imagine. I have formal education in Computer Science, but it took me a while to translate that knowledge into something I could use in Rust, whereas in C# you don't really need to think about those concepts all that much since the compiler thinks about it for you. That being said, I'd never go back if I could. Rust is a fantastic language, and despite it being stricter and requiring more thought, it feels like a comfier, safer and stronger foundation than I've had before
I went from C# to rust and it was not hard, but it probably depends on other experience and what you've done in each language. I'm a 20 year dev and I've used a lot of languages, and a lot of it is transferable. A lot of C# devs that I interview barely know C# and can't even do multithreading, because all they have ever done is CRUD web services.
@@georgehelyar Oh absolutely, it wasn't a knock at C# or C# devs! We definitely have a cohort of devs who have no idea that there is an under the hood, let alone what's happening there. I'd wager there's a LOT of web devs who couldn't even begin to explain what an array really is, and the difference betweeen it and a list for example
@@georgehelyar That makes sense. I'd done C# for about 9 years by the time I started learning Rust. Most of my time I spent writing WPF apps and lots of front-endy stuff (still do, just blazor now), so my skills weren't particularly transferable. Though the skills I picked up in hobby projects that didn't involve so much front end stuff did end up transferring. Actually, thinking about it, most of the transferable skills I had were after learning core language features, such as multithreading, FFI and the like. Most of my trouble came from lifetimes, borrowing and misunderstanding traits as the same thing as interfaces.
The funny thing is about learning Rust is how you start to appreciate languages like C# even more that do a lot of these concepts for you. We still code mostly in C#, but the low level stuff (mostly drivers and interfacing with weird hardware) we use Rust...
Good insight. As someone who got his start in the dark ages of C, talk of memory management, pointers, etc, holds no fear, if anything leaves me slightly smug. Glad I learned them when I still needed them, even though I then got shifted into the "glory" of managed languages - and got lazy. Java, C#, Python, Go... But you put your finger on major issues: finding the use case and dealing with the drop in productivity. At work, you may have the former, but the Powers That Be may not allow you the latter. Learning it in your own time, you will have the latter, but you need that spark of an idea for a long-term personal project. I've been working on an iOS app in my spare time for years. It's become more of a learning platform to teach me new concepts rather than "Im going to build the new killer app". Rust support in iOS is still somewhat new, but maybe converting my code to Rust is the way to go.
My days. I'm so fvcked. Started learning this lang 3 days ago with nothing but little bash and python knowledge cause I have a program I really wanna write and now I wanna kms. Now I gotta learn all of this. Amazing video man! :)
It's worth it also you don't need to know any of this stuff it will just deepen your understanding. Do what you want with the language and learn the things you need along the way
This is why I love rust, I dropped out of school half way in and some cs concepts are fuzzy for me. (Binary, Sogned/unsigned ints, buffers, etc) have come up a lot in the beginning of me learning I g rust and I honestly love it. It’s like going back to school without have to pay for it or dread learning. I made it thru college off RUclips anyways, this is no different.
what do you think of the "copying while trying to understand" method of learning? people often say that it's good to always fully understand and build things on your own, but I've come to a conclusion that withou a repertoire, we simply can't build things.
You need to start small. That is easier said than done. PC’s etc are very involved and a programmer quickly becomes entangled in many issues. I think newcomers must play with small embedded boards like stm32 based boards. You can engage with concepts more directly without a huge operating system etc to cope with
I want to learn rust, but I'm having a hard time getting over the first hurdles, like importing packages without getting version incompatibility errors...
I was a c++ developer, then I switched to Js/ React but I feel like I am done with React and Js problems. I am thinking about Rust but I will need good resources for learning
Great video, but I don't agree in 5:58, where you say we have to "think about runtime performance, and about how things are laid out in memory". I think we almost never need to think about runtime performance, everything is just screaming fast most of the time! And why would one think memory layouts? Most 100% Rust software will never need to think about that, only when using FFI to interface with other languages, and perhaps when implementing a Vec or similar, i.e., allocating and initializing memory on demand. All in all, in most cases Rust is awesome to use as a high-level language, you don't need to think that much about performance or memory!
The first thing i would like to know is that docker deploy is extremely difficult. i never got over it :( i lost a lot of time, trying to deploy the project took longer than development and failed. I don't develop on rust anymore :( I can't correctly hadle work with prisma
I wish just half of all the people blogging about Rust would know these basics. I see so many rants about some Rust feature just because they don’t understand some CS basics.
A list of unique features that Rust invented : - compiling to machine code - the concept of having a stack - the first and only language that guarantees no bugs - automatic allocation and reallocation - multi threading - traits - memory safe array indexing - match semantics - errors as values - optional types - the first language ever that allows developers to rewrite existing apps into a new language - the compiler providing error messages telling you what bits of code won’t compile - adding debug symbols to the executable, for debugging - compile to wasm as a target - uses the cpu, so it’s faster than JavaScript or python - successful integration of politics into the tech stack - is the only language that “younger programmers” can understand apparently, so has to be the only alternative to C in Linux kernel These are all actual examples of BS claims that real people have spouted off about, when discussing Rust
@@steveoc64 some rust programmers have turned religious, effectively spreading their ignorance wherever they go. But I do think it's a nice language which I am going to learn for research purposes.
It might be hard to appreciate Rust until you've at least spent some time with C or C++. You can get pretty far with either. But it's the maintenance headaches on anything over 20 klocs of C or C++ with multiple dependencies that are the clear motivations for Rust's design.
Ah... I will get rock-solid hate, but honestly... do I need Rust? I was trying to learn it and I have to say, I do actually like it... but hell. I am jumping every single day between backend, frontend and mobile. So... I always end up with my friend TypeScript. Backend = Nestjs, Frontend = React, Mobile = React native. I know BE and FE can be done by Leptos. But mobile? Nah, not even close...
The benefits of AI for me has been outstanding. I don’t think it’s final or true all the time, but parsing a file, traversing directories etc can be done in seconds with the help of AI
i have fundamentals of c and c++, but i have been out of touch for so long, and working as webdev... so should i start with those or dive straight to rust? i have been learning little bit of rust... but not getting full motivation to dedicate
@@lvsd i know problems like memory management, issues with string due to null termination, absolute disasters of shared libs because of not having a first party package management solution, but i only have really basic understanding and only done few cli apps... so don't know how things like smart pointers works....
@@vaisakh_km i saw some exaamples of CLI in Rust, and It looks really simple due to the "builder pattern" a library used. A pain for me when I was learning C, was that there was no "Method", which is sort of a more constrained and syntax sugared for functions. Emulating the desugared form of methods from Rust in C was a pain. But at least gave me confidence that the code would work due to having functions doing specific responsibilities while I was doing my C Homeworks
@@vaisakh_km Smart pointers are really not that hard; they are easy to get into, and you will surely stumble into them when trying things like multithreading. I recommend looking into Box and Rc/Arc. You will notice that they are really simple. Smart pointers like Cow, Cell, etc., are not often used when writing normal production code, so you don't really need to know every one from the beginning.
Honestly it's fine. You can learn smart pointers as well in Rust. Theyre pretty much the same conceptually. Learn C++ if you want to know how painful things can be@@vaisakh_km
I don't normally crap on people's videos. I appreciate the time and effort put in, especially the high production value. But I have a real problem with this video in particular. You're presenting these 5 things as though they're a barrier to entry. They really are not. Why? Because the 'official' way to learn Rust - The Rust Book - covers every one of these concepts and it does so in an incredibly easy to understand way, using analogies, as well as directly addressing how Rust works with the concepts and why they're important. Chapter 4 of The Rust Book has possibly the best breakdown of the stack and the heap that I've ever seen, and then goes on to show you exactly what you need to know. This video, and many of the comments below it, are seriously off-putting to newcomers. Don't be put off! Just follow The Rust Book, make notes, do the exercises, and you'll be well on your way!
When I have 3 years of experience in JS, I struggled a lot. It took me another 3 years to think in Architect level in React and React native. Now I am ready to take the new challenge in Rust.
100s of people are taking rust as their first language. Also many are coming to rust from js. Don't scare them away ! Here is a list of 100 things you need to learn before learning rust
For me, picking up rust isn't as intuitive or as easy like JS. With JS I can tryout and evaluate statements in the browser. Rust is also resource $expensive. A simple application costs quite a lot in terms of disk space (windows machine, vs-ccode). The file system also feels clunky. To expose type and functions you need a separate file with a specific naming like a header file in C. I might be wrong as I'm still not proficient in it. It's not as easy as the import/export nomenclature in languages like JS, C#, java, traditional C like languages. I still can't wrap my head around macros. They look like functions to me. In terms or readability, I cant seem to get used to snake (or caterpillar) casing. I think acronym naming doesn't help as well. E.g. 'fn', 'mut'. If I have time, I would try to learn more and try out more of rust. Then perhaps I would have better insights on the language.
5 Things Before Rust: 1: Avoid Rust 2. When someone mentions Rust, laugh uncontrollably 3. Recommend Python instead 4. Iterate 'Learning Rust Takes Time to Learn, minimum 2 years.' in a Lisp Loop. 5. Promote ASM, a difficult language to learn but is easier than Rust.
Good explanation why Rust is very bad as a first language. You have to know at least three other languages before starting to get anywhere! I think knowing JavaScript, C++ and Haskell helped me a lot. It still wasn't easy, because the borrow checker is unique to Rust.
Although I really think it's totally helpful to know enough other languages, it's not an absolute requirement. There is also a possible learning trajectory when starting with Rust, and then learn all things on the flow, even though it will probably go much slower. It's even possible for someone to start with it, then move to other languages because Rust was so difficult, and then to ultimately come back to it and pick it up further.
This is all nonsense. I began by creating practical projects with considerable help from Copilot and GPT-4. I consistently inquired about the best practices for various tasks and sought explanations for concepts I didn't understand. I even developed working prototypes for parts of my project before fully grasping Rust's borrowing and other concepts. Within a month, I had gained extensive knowledge about runtimes, futures, borrowing, channels, and actors, all with the assistance of AI. The best aspect of Rust is that it compels you to write correct programs. Consequently, the AI's learning base is mostly composed of correct programs, resulting in more accurate suggestions from AI than for other languages.
I used the same path as you. I won’t recommend learning c++ before because c++ itself is a beast which takes a lifetime to master. Go strait to rust with a good project in mind. Learn the concepts you do not understand along the way.
The statement where u call Null pointer as a Billion $ mistake and saying uses Result type shows how shallow your knowledge is around basic computer architecture. Functions in C, C++ return something. You can choose to return a struct of {value, error_t }.
The statement where he calls Null pointer a Billion $ mistake is actually a reference to Tony Hoare (The "creator" of the null pointer) saying "I call it my billion-dollar mistake.", in an interview when asked about them.
So I have to learn programing in C and C++ if I want to program in Rust? Isn't there any other way to understand Rust? I could just read about those concept and try to understand them without spending hundreds of hours programming in a language I don't want to program in. Is it really so hard?
It really is that hard. Rust is intended for developers who already know most of the concepts it uses. That being said, go ahead and give it a try anyway. If you want to learn Rust, just go ahead and give it a shot - worst that could happen is you don't get it and end up switching to something else.
@@bluesillybeard I am currently working on my first website and going through html and css (I know, I know, baby steps...) and I was also thinking why not finish it with wasm and rust. Everywhere I hear and read javascript is terrible, so I'm thinking why even bother with it and go straight with the good stuff.
@@shapaco89 last I tried Rust+wasm was like 2 or 3 years ago, and there wasn't a lot about it. I imagine these days though, there are tons of tutorials on how to set that up. Funnily enough, I myself am working on my first website! It's all just static pages though.
imo, yes you could. I have seen many videos of this channel, but this one just very missleading. You could learn Rust without any C++ knowledge, most likely you'd even be better off doing that
To verify what? The problem with null pointers is that you are just setting some data to 0, even if that data is an address of other data. But sometimes this is actually what you want, 0 not null. E.g. if i have an app with a base virtual address of 0 where its main function lives then I want to branch to a pointer with value 0, but some languages assume that 0 means null so it raises an error incorrectly.
I don’t know why Rust devs keep harping on null pointers in C++. C++ memory allocators do not return null pointers, they throw an exception on allocation failure. C++ smart pointers also don’t have null pointers unless default constructed. If you use std::make_unique/shared you always have fully constructed objects in your smart pointers. Null pointers are really a C thing not C++, it’s easy to write in C++ without ever making null pointer checks.
I love Rust, mostly because merely mentioning it will reveal some devs who call it "woke" and inevitably expose themselves as more concerned with politics than reliable tech.
If you think you know just Rust and won't more or less easily adapt to related languages like C++, then chances are you don't actually know Rust to an extent that you could get a job in it anyway
@@jonathanbrown5645 unfortunately most jobs currently in the EU are dealing with crypto and web3. I guess that is something instead of nothing, but these are mostly dodgy startups. In Greece for instance there is no mention of Rust whatsoever. Moreover, most other companies they mentioning Rust either as in knowing a systems programming language in general or as a possible complimentary language to C++. Rust needs time. However, let me also add that the language is not easy to pick up. I am sure plenty of people are going to bash me as not investing a lot, being dumb etc. However, I used it in a professional environment in the networking space, for a mid size project and we had issues. We were fighting the borrow checker a lot, code could become unreadable if many traits were needed, async code was a hurdle. I guess a lot of people tend to see, or try to see for some unknown reason as if they own part of a language although this is also part of herd mentality, only the good sides of the language. True we did feel more safe when compiling and less UB. Cargo is amazing. But DX was lacking especially for mid to large projects and as I said the syntax in many cases is very difficult to read. Not to mention the macros or proc macros which by themselves are like a separate programming language. I am just saying that Rust is not the one systems programming language to rule them all and I feel that it is advertised as such not by the creators but the community. Will it stay? Obviously. There are a lot of pros which in some cases outweigh the cons. But it will take time and I do not think it will overtake C++. I guess that as a "special forces" language for critical systems were memory safety is paramount it is going to be used first. But for general DX and speed of development C++ might be a better choice although not the sanest.
1. it is a cult. 2. it aims to solve a problem, but doesn`t , it simply forces the compiler to get in your way, but you might actually code around that and the compiler still thinks it has done its job. 3. compile time is dogshit slow. 4. it aims to solve a problem that really is not a problem. 5. it is still a cult.
1. Surely is rust that is a cult and not the bunch of robots that appear in almost every single rust video to say it is a cult and shit on the language without presenting actual arguments, right?
If you say that someone needs to know programming before use Rust, that fact makes Rust a trash. I don't think you need al of this to learn Rust, but I do think that you need learn Rust trash to be a Rust developer. Like lifetimes explicit annotations.
📝Get your *FREE Rust cheat sheet* :
letsgetrusty.com/cheatsheet
Yes, all of the concepts you mentioned here are obviously relevant and useful for learning Rust. Certainly knowing about the memory model, the stack vs the heap, etc. However, and I mention this mostly as a note to newcomers who may be discouraged by the sheer number of things mentioned here from learning Rust, that I think it's a mistake to refer to all of this as things you wished you knew "before learning Rust." You can learn many of these things along the way and sharpen your understanding as you go. I wouldn't view everything mentioned here as some hard prerequisite. Often times, when we learn new things, we have a hindsight bias problem where, after having learned all the things, we look back and say "gee I wish I had known these things before diving into or learning X"...but maybe it was totally fine to have learned these things by way of learning X. Sometimes it is actually preferable since learning X provides the context and motivation. Just my 2c
Agreed! I learned much of this along the way :)
@@letsgetrusty Your right, but to be fair the title of this video is things he wished he'd learnt, not things he should have learnt.
I was just about to type this. Just learn as you go, and you will be just fine!
Well said.
I honestly think starting with a simple app that can be expanded is the best way to learn hands on. This is why web developers create todo's so often, but I think its even more interesting to do for languages with file access like rust, you can start with a terminal todo that is just: list add remove toggle . Then when you feel like you are happy with that expand it, save the list to a file so you can load it on start. Allow the user to save multiple lists and files, and have a default that loads on start. Add colors, add timestamps and due dates and completion dates etc etc. This is how I have been learning Rust this last month and I feel like the hardest thing has been just making sure I'm returning the right data Result vs Option vs String vs str and understanding the Borrow checker in edge areas like when you aren't putting str's in variables (something you do in scripting languages often, in place raw data manipulation, needs a tiny bit more understanding in Rust IME).
The best way to love Rust is to know C++ deep enough to love it and wish it's death at the same time.
Hahaha, ironically 😄
beautifully phrased
its*
@@JorgetePanete se me fue, el ingles no es mi idioma nativo.
What a wise words
C++ was my favourite language for a very long time. I got introduced to Rust through a project at work. After a few pages of the Rust Book, I immediately noticed that I really like Rust and that for me it is C++, just improved with all the things that annoy me about C++. I really hope that we will see more and more Rust in the future and that the language will continue to develop. I don't have much experience with Rust yet, but it has already replaced C++ as my favorite language 😅
Of course, this process is known as oxidation 😂
Have some experience with the language, then the story might be different.
For me Rust totally made sense the first day I touched it. After about 20 years of touching many other languages, most things in Rust landed quickly for me.
And of course things can be frustrating sometimes and getting things done goes slower, but it's absolutely true that the result is great software.
I don't work with Rust professionally yet and jobs even quite difficult to find too as it seems. But that does not matter so much to me.
I work mostly in C# which is also a really great language for now. But I have always explored and used far more, including C and C++, and I have actively decided to take Rust very seriously, because I believe in it's future, too important to ignore. That was the main point even before learning it and I am feel no regret.
Rust is C++ done right
Jeremy Chone is the best Rust resource in RUclips for backend dev, after you get the foundation knowledge right from the Rust Book and Rust by Example.
I don't think you mentioned it, but I started with the "Programming Rust" book. It's incredibly well-written, and explains Rust concepts in relation to C, so it explains why the concept is an issue in C and is fixed in Rust. This gives you a great understanding of why things are the way they are in Rust without needing to struggle through learning C to appreciate it.
Having only ever written PHP and JS, I definitely feel the mountain of concepts and terminology I've never heard of or had to worry about. It's still fun to just dive in and try things just because the compiler error messages are so insanely good. I will probably never be a "proper" programmer (missing far too much math knowledge sadly), but for what I want to do with it, I'll manage.
No need to fret about missing math knowledge. Learn math in your soul when it's necessary, not through simply memorizing concepts. Good luck!
I'm working full time as a PHP developer, and I don't need more math skills than basic arithmetics in my day to day (addition, multiplication, etc). If you want to work with AI or other highly advanced stuff, you need that knowledge, but you don't need to be a mathematician to be a successful developer. :)
@@Wiikend The things you do with PHP aren't what I meant with "proper". You don't need math for CRUD APIs, but you need it for everything else.
I went from C++ to Rust and suddenly, C++ made so much more sense.
Its insane how Rust rewires your brain.
Yeah, its insane how Rust devs with rewritten brain hate UB and memory errors.😅
@@linkernick5379 Is this... bait? Who in their right mind wants UB and memory errors in their program?
I'm not a developer by trade, though I do write code professionally in my DevOps/Sysadmin'y work - mostly the MS stack on C#/PowerShell etc. A few years ago I sat down and learnt C to a reasonable standard, it was a tough process but in learning Rust I've really appreciated the grounding it's given me. So much of what people hate about Rust just hasn't bothered me, because it conceptually makes sense. I don't find myself wrestling with the dreaded borrow checker (mostly..) and so on. But, I think had I gone from C# with all its cuddly help and GC I would have absolutely hated Rust. I'm now writing lots of embedded code in Rust and just loving the journey
I was a Python developer for most of my career. Going from that to Rust was tough. I really had to work my brain out of thinking about coding problems from the interpreted language perspective.
I made that journey you mentioned from C# to Rust, and yeah it was just as tough as you'd imagine. I have formal education in Computer Science, but it took me a while to translate that knowledge into something I could use in Rust, whereas in C# you don't really need to think about those concepts all that much since the compiler thinks about it for you.
That being said, I'd never go back if I could. Rust is a fantastic language, and despite it being stricter and requiring more thought, it feels like a comfier, safer and stronger foundation than I've had before
I went from C# to rust and it was not hard, but it probably depends on other experience and what you've done in each language.
I'm a 20 year dev and I've used a lot of languages, and a lot of it is transferable.
A lot of C# devs that I interview barely know C# and can't even do multithreading, because all they have ever done is CRUD web services.
@@georgehelyar Oh absolutely, it wasn't a knock at C# or C# devs! We definitely have a cohort of devs who have no idea that there is an under the hood, let alone what's happening there. I'd wager there's a LOT of web devs who couldn't even begin to explain what an array really is, and the difference betweeen it and a list for example
@@georgehelyar That makes sense. I'd done C# for about 9 years by the time I started learning Rust. Most of my time I spent writing WPF apps and lots of front-endy stuff (still do, just blazor now), so my skills weren't particularly transferable. Though the skills I picked up in hobby projects that didn't involve so much front end stuff did end up transferring.
Actually, thinking about it, most of the transferable skills I had were after learning core language features, such as multithreading, FFI and the like. Most of my trouble came from lifetimes, borrowing and misunderstanding traits as the same thing as interfaces.
The funny thing is about learning Rust is how you start to appreciate languages like C# even more that do a lot of these concepts for you.
We still code mostly in C#, but the low level stuff (mostly drivers and interfacing with weird hardware) we use Rust...
Shout out to The Cherno! Helped me to learn intermediate/advanced C++.
Good insight. As someone who got his start in the dark ages of C, talk of memory management, pointers, etc, holds no fear, if anything leaves me slightly smug. Glad I learned them when I still needed them, even though I then got shifted into the "glory" of managed languages - and got lazy. Java, C#, Python, Go...
But you put your finger on major issues: finding the use case and dealing with the drop in productivity. At work, you may have the former, but the Powers That Be may not allow you the latter. Learning it in your own time, you will have the latter, but you need that spark of an idea for a long-term personal project. I've been working on an iOS app in my spare time for years. It's become more of a learning platform to teach me new concepts rather than "Im going to build the new killer app". Rust support in iOS is still somewhat new, but maybe converting my code to Rust is the way to go.
He got a fresh cut 😎
My man is crispy and smooth at the same time. 😎
My days. I'm so fvcked. Started learning this lang 3 days ago with nothing but little bash and python knowledge cause I have a program I really wanna write and now I wanna kms. Now I gotta learn all of this. Amazing video man! :)
It's worth it also you don't need to know any of this stuff it will just deepen your understanding. Do what you want with the language and learn the things you need along the way
@@laceycodetime thank you so much, means alot
How to Learn Rust:
Step 1. Learn C++
Step 2. Learn to solve SIGSEGV faults and memory leaks and become frustrated
Step 3. Learn Rust
As a person who took the first classes in programming using C i can say, Rust is awesome. I'm really enjoying, bright future.
Two of the best learning resources for Rust are Let's Get Rusty, and No Boilerplate.
I love Rust... It's my favorite language now, kicking down Typescript...
This is why I love rust, I dropped out of school half way in and some cs concepts are fuzzy for me. (Binary, Sogned/unsigned ints, buffers, etc) have come up a lot in the beginning of me learning I g rust and I honestly love it. It’s like going back to school without have to pay for it or dread learning.
I made it thru college off RUclips anyways, this is no different.
what do you think of the "copying while trying to understand" method of learning?
people often say that it's good to always fully understand and build things on your own, but I've come to a conclusion that withou a repertoire, we simply can't build things.
Great video, and thanks for the mention!
Security by Design (SbD) is a real thing in Cyber Security. Looks like Rust works along with it.
Wow, what a great refernce guide for those wanting to learn Rust! I'm going to look into those concepts that I know less about now!
Rust is high-level language like c++. It has lots of abstractions
Excellent advice, what are some good resources to learn multithreading, parallelism and concurrency concepts?
I came here for Rust and ended up with philosophical thoughts... (5:41)
Pdt. Cool video, I think Rust has a great projection in future
Somehow, ownership pattern can come up in JavaScript when copying objects. So you have to deep copy objects.
Could you plz post all the resources links somewhere?
Posted in the description!
they teach stack and heap in cs? had to google that myself
You need to start small. That is easier said than done. PC’s etc are very involved and a programmer quickly becomes entangled in many issues. I think newcomers must play with small embedded boards like stm32 based boards. You can engage with concepts more directly without a huge operating system etc to cope with
I mean, I knew a bit of C and C++, but I mostly used python before rust (which to me is the best of both)...
I want to learn rust, but I'm having a hard time getting over the first hurdles, like importing packages without getting version incompatibility errors...
I was a c++ developer, then I switched to Js/ React but I feel like I am done with React and Js problems. I am thinking about Rust but I will need good resources for learning
Great video, but I don't agree in 5:58, where you say we have to "think about runtime performance, and about how things are laid out in memory". I think we almost never need to think about runtime performance, everything is just screaming fast most of the time! And why would one think memory layouts? Most 100% Rust software will never need to think about that, only when using FFI to interface with other languages, and perhaps when implementing a Vec or similar, i.e., allocating and initializing memory on demand. All in all, in most cases Rust is awesome to use as a high-level language, you don't need to think that much about performance or memory!
May I ask how long it took you to learn through this journey?
Thanks again, Bogdan, as always, great stuff. Could you please link the resources links in the description? I'm interest in those Harvard lessons
Done!
"before learning Rust, I recommend reading these 7 Rust books"
The first thing i would like to know is that docker deploy is extremely difficult. i never got over it :( i lost a lot of time, trying to deploy the project took longer than development and failed. I don't develop on rust anymore :( I can't correctly hadle work with prisma
do you have any tips to prevent my base from getting raided?
I wish just half of all the people blogging about Rust would know these basics. I see so many rants about some Rust feature just because they don’t understand some CS basics.
A list of unique features that Rust invented :
- compiling to machine code
- the concept of having a stack
- the first and only language that guarantees no bugs
- automatic allocation and reallocation
- multi threading
- traits
- memory safe array indexing
- match semantics
- errors as values
- optional types
- the first language ever that allows developers to rewrite existing apps into a new language
- the compiler providing error messages telling you what bits of code won’t compile
- adding debug symbols to the executable, for debugging
- compile to wasm as a target
- uses the cpu, so it’s faster than JavaScript or python
- successful integration of politics into the tech stack
- is the only language that “younger programmers” can understand apparently, so has to be the only alternative to C in Linux kernel
These are all actual examples of BS claims that real people have spouted off about, when discussing Rust
@@steveoc64 some rust programmers have turned religious, effectively spreading their ignorance wherever they go. But I do think it's a nice language which I am going to learn for research purposes.
@@steveoc64I have no idea where you've been to hear 90% of what you said. And I've seen the most religious rustaceans. You mostly made up bs
Bro, Discovery Channel is looking for a new narrator 😂😂😂 alternatively, you could make scammy content. You'd be Dan Lok on steroids 😂😂😂😂😂
First video of these I wish I knew videos that was actually super useful. Also are you using the eye contact AI program?
It might be hard to appreciate Rust until you've at least spent some time with C or C++. You can get pretty far with either. But it's the maintenance headaches on anything over 20 klocs of C or C++ with multiple dependencies that are the clear motivations for Rust's design.
Ah... I will get rock-solid hate, but honestly... do I need Rust? I was trying to learn it and I have to say, I do actually like it... but hell. I am jumping every single day between backend, frontend and mobile. So... I always end up with my friend TypeScript. Backend = Nestjs, Frontend = React, Mobile = React native. I know BE and FE can be done by Leptos. But mobile? Nah, not even close...
The benefits of AI for me has been outstanding. I don’t think it’s final or true all the time, but parsing a file, traversing directories etc can be done in seconds with the help of AI
i have fundamentals of c and c++, but i have been out of touch for so long, and working as webdev...
so should i start with those or dive straight to rust? i have been learning little bit of rust... but not getting full motivation to dedicate
Jumping strait to rust is generally ok if you know the pain points of c and c++
@@lvsd i know problems like memory management, issues with string due to null termination, absolute disasters of shared libs because of not having a first party package management solution,
but i only have really basic understanding and only done few cli apps... so don't know how things like smart pointers works....
@@vaisakh_km i saw some exaamples of CLI in Rust, and It looks really simple due to the "builder pattern" a library used. A pain for me when I was learning C, was that there was no "Method", which is sort of a more constrained and syntax sugared for functions. Emulating the desugared form of methods from Rust in C was a pain. But at least gave me confidence that the code would work due to having functions doing specific responsibilities while I was doing my C Homeworks
@@vaisakh_km Smart pointers are really not that hard; they are easy to get into, and you will surely stumble into them when trying things like multithreading. I recommend looking into Box and Rc/Arc. You will notice that they are really simple. Smart pointers like Cow, Cell, etc., are not often used when writing normal production code, so you don't really need to know every one from the beginning.
Honestly it's fine. You can learn smart pointers as well in Rust. Theyre pretty much the same conceptually. Learn C++ if you want to know how painful things can be@@vaisakh_km
so, would you recomend learn c/c++ before rust?
In my opinion, learn rust first and capitalize on your interest while it lasts.
@@macsquad5773 thanks :)
I don't normally crap on people's videos. I appreciate the time and effort put in, especially the high production value. But I have a real problem with this video in particular. You're presenting these 5 things as though they're a barrier to entry. They really are not. Why? Because the 'official' way to learn Rust - The Rust Book - covers every one of these concepts and it does so in an incredibly easy to understand way, using analogies, as well as directly addressing how Rust works with the concepts and why they're important. Chapter 4 of The Rust Book has possibly the best breakdown of the stack and the heap that I've ever seen, and then goes on to show you exactly what you need to know. This video, and many of the comments below it, are seriously off-putting to newcomers. Don't be put off! Just follow The Rust Book, make notes, do the exercises, and you'll be well on your way!
Could you provide resources to help out with some of these things?
Posted a list of resources in the description!
When I have 3 years of experience in JS, I struggled a lot. It took me another 3 years to think in Architect level in React and React native. Now I am ready to take the new challenge in Rust.
"Strict static typing"...
May I interest you in the rabbit hole of trait objects?... [insane laugh]
that's a lot of resources man!!
brooks builds is also a good channel for rust.
Finally, r u using RUST fulltime in ur 9 to 5 job ?
Bcz, Y still lot of less Rust based full time roles in 2024 ?
100s of people are taking rust as their first language. Also many are coming to rust from js. Don't scare them away !
Here is a list of 100 things you need to learn before learning rust
great video, thanks for the help
I got you
Should i learn cpp before the rust
Up to you but imo I think you will learn faster if you just start with rust
what adoption exactly?
Yo, I wanna learn Rust, but I only know C, not C++. Everyone in the comments is talking about C++, and it's making me a bit nervous.
Why? My background is c too, now I'm on rust, rust is good but need to modify our understanding in the past :p
For me, picking up rust isn't as intuitive or as easy like JS.
With JS I can tryout and evaluate statements in the browser.
Rust is also resource $expensive.
A simple application costs quite a lot in terms of disk space (windows machine, vs-ccode).
The file system also feels clunky. To expose type and functions you need a separate file with a specific naming
like a header file in C. I might be wrong as I'm still not proficient in it.
It's not as easy as the import/export nomenclature in languages like JS, C#, java, traditional C like languages.
I still can't wrap my head around macros. They look like functions to me.
In terms or readability, I cant seem to get used to snake (or caterpillar) casing.
I think acronym naming doesn't help as well. E.g. 'fn', 'mut'.
If I have time, I would try to learn more and try out more of rust.
Then perhaps I would have better insights on the language.
resource expensive? compared to javascript and python???????
He probably compares a rust executable and a js file@@Marisueksu
The video we all needed
Does bro have a Discord Server??
5 Things Before Rust:
1: Avoid Rust
2. When someone mentions Rust, laugh uncontrollably
3. Recommend Python instead
4. Iterate 'Learning Rust Takes Time to Learn, minimum 2 years.' in a Lisp Loop.
5. Promote ASM, a difficult language to learn but is easier than Rust.
6. There are string types more than 10. Most of your development time goes thinking of how to convert one another.
Thought this was about the game rust for a sec 🙏
C++ numbawan! and evolving!
Let's Get Rusty!!
Bruh i feel like the “slow production” is kinda false. Rust taught me the “if it compiles it works” idiom which makes stuff super easy
Rust is truly a software engineer's language
Are you AI generated?
Is that supposed to be a pickup line?
So basically everything, right on hahaha
Good explanation why Rust is very bad as a first language. You have to know at least three other languages before starting to get anywhere!
I think knowing JavaScript, C++ and Haskell helped me a lot. It still wasn't easy, because the borrow checker is unique to Rust.
Although I really think it's totally helpful to know enough other languages, it's not an absolute requirement.
There is also a possible learning trajectory when starting with Rust, and then learn all things on the flow, even though it will probably go much slower.
It's even possible for someone to start with it, then move to other languages because Rust was so difficult, and then to ultimately come back to it and pick it up further.
Дякую, Богдане)
Starting from 0 ready to suffer, wish me luck 😂
I don't know why people think rust is hard
I moved from python (I did python for 8 years) to rust in a few weeks
Watching your video is like asking to ChatGPT. Alot of boilerplate with alot of bullet points. 90% of which we already heard of over and over again.
Rust, the grown ups language…
This is all nonsense.
I began by creating practical projects with considerable help from Copilot and GPT-4. I consistently inquired about the best practices for various tasks and sought explanations for concepts I didn't understand. I even developed working prototypes for parts of my project before fully grasping Rust's borrowing and other concepts. Within a month, I had gained extensive knowledge about runtimes, futures, borrowing, channels, and actors, all with the assistance of AI. The best aspect of Rust is that it compels you to write correct programs. Consequently, the AI's learning base is mostly composed of correct programs, resulting in more accurate suggestions from AI than for other languages.
Not all are as smart as you are.
I used the same path as you. I won’t recommend learning c++ before because c++ itself is a beast which takes a lifetime to master. Go strait to rust with a good project in mind. Learn the concepts you do not understand along the way.
I know python, can I start rust?
Bogdan gets hotter every vid
The statement where u call Null pointer as a Billion $ mistake and saying uses Result type shows how shallow your knowledge is around basic computer architecture.
Functions in C, C++ return something. You can choose to return a struct of {value, error_t }.
The statement where he calls Null pointer a Billion $ mistake is actually a reference to Tony Hoare (The "creator" of the null pointer) saying "I call it my billion-dollar mistake.", in an interview when asked about them.
So basically all covered in computer science
...remember to stay rusty🦀.
He meant 500 things he wish he knew
Not yet. You'll finally get it when you stop promoting Rust. At that point, you'll probably need some counseling to get over it, but you'll be ok.
I would not recommend diving into C++ and learn Rust right away.
wysi
So I have to learn programing in C and C++ if I want to program in Rust? Isn't there any other way to understand Rust? I could just read about those concept and try to understand them without spending hundreds of hours programming in a language I don't want to program in. Is it really so hard?
It really is that hard. Rust is intended for developers who already know most of the concepts it uses.
That being said, go ahead and give it a try anyway. If you want to learn Rust, just go ahead and give it a shot - worst that could happen is you don't get it and end up switching to something else.
@@bluesillybeard I am currently working on my first website and going through html and css (I know, I know, baby steps...) and I was also thinking why not finish it with wasm and rust. Everywhere I hear and read javascript is terrible, so I'm thinking why even bother with it and go straight with the good stuff.
@@shapaco89 last I tried Rust+wasm was like 2 or 3 years ago, and there wasn't a lot about it. I imagine these days though, there are tons of tutorials on how to set that up.
Funnily enough, I myself am working on my first website! It's all just static pages though.
imo, yes you could.
I have seen many videos of this channel, but this one just very missleading.
You could learn Rust without any C++ knowledge, most likely you'd even be better off doing that
Hard disagree!
You can learn most if not all of those as you go
Вітання з України. Гарний контент. Так тримати
In other words, to learn Rust, you must have 25 years experience in c :P
So you don’t need Rust you need to go back to school!
1:49, I disagree. If someone is afraid of nullptr, he should write some tool to verify that automatically.
To verify what?
The problem with null pointers is that you are just setting some data to 0, even if that data is an address of other data. But sometimes this is actually what you want, 0 not null. E.g. if i have an app with a base virtual address of 0 where its main function lives then I want to branch to a pointer with value 0, but some languages assume that 0 means null so it raises an error incorrectly.
@@gregoryfenn1462I think you are going too far.
Yeah, they did, it’s called enumerations and pattern matching.
I don’t know why Rust devs keep harping on null pointers in C++. C++ memory allocators do not return null pointers, they throw an exception on allocation failure. C++ smart pointers also don’t have null pointers unless default constructed. If you use std::make_unique/shared you always have fully constructed objects in your smart pointers. Null pointers are really a C thing not C++, it’s easy to write in C++ without ever making null pointer checks.
what a nice hairline. so jealous
I love Rust, mostly because merely mentioning it will reveal some devs who call it "woke" and inevitably expose themselves as more concerned with politics than reliable tech.
6th is that there are no jobs available...
There's a lot on indeed?
@@jonathanbrown5645 I never see any... Which companies are hiring for Rust??
If you think you know just Rust and won't more or less easily adapt to related languages like C++, then chances are you don't actually know Rust to an extent that you could get a job in it anyway
@@zackarysemancik5491 Sp you're only learning it to get hired? Microsoft and Google are starting to use Rust more and more.
@@jonathanbrown5645 unfortunately most jobs currently in the EU are dealing with crypto and web3. I guess that is something instead of nothing, but these are mostly dodgy startups. In Greece for instance there is no mention of Rust whatsoever. Moreover, most other companies they mentioning Rust either as in knowing a systems programming language in general or as a possible complimentary language to C++. Rust needs time.
However, let me also add that the language is not easy to pick up. I am sure plenty of people are going to bash me as not investing a lot, being dumb etc. However, I used it in a professional environment in the networking space, for a mid size project and we had issues. We were fighting the borrow checker a lot, code could become unreadable if many traits were needed, async code was a hurdle. I guess a lot of people tend to see, or try to see for some unknown reason as if they own part of a language although this is also part of herd mentality, only the good sides of the language. True we did feel more safe when compiling and less UB. Cargo is amazing. But DX was lacking especially for mid to large projects and as I said the syntax in many cases is very difficult to read. Not to mention the macros or proc macros which by themselves are like a separate programming language.
I am just saying that Rust is not the one systems programming language to rule them all and I feel that it is advertised as such not by the creators but the community. Will it stay? Obviously. There are a lot of pros which in some cases outweigh the cons. But it will take time and I do not think it will overtake C++. I guess that as a "special forces" language for critical systems were memory safety is paramount it is going to be used first. But for general DX and speed of development C++ might be a better choice although not the sanest.
1. it is a cult. 2. it aims to solve a problem, but doesn`t , it simply forces the compiler to get in your way, but you might actually code around that and the compiler still thinks it has done its job. 3. compile time is dogshit slow. 4. it aims to solve a problem that really is not a problem. 5. it is still a cult.
You clearly don't understand Rust. It prevents you from writing code that wouldn't work anyway. It definitely does solve the problem.
Yeah like 98% of bugs ain't double free or null pointer access, the problem doesn't exist you know
1. Surely is rust that is a cult and not the bunch of robots that appear in almost every single rust video to say it is a cult and shit on the language without presenting actual arguments, right?
This thread proves their first point even more 😂
@user-to2ow2yk8x actually a significant majority of bugs are issues such as nullptr dereferences.
If you say that someone needs to know programming before use Rust, that fact makes Rust a trash.
I don't think you need al of this to learn Rust, but I do think that you need learn Rust trash to be a Rust developer. Like lifetimes explicit annotations.