For those comparing Go and Rust, look at it this way: Go is the best gateway drug to Rust. Learning Go makes it easier to learn Rust if you don't have a C/C++ background. Go also offers 80% of the benefits of Rust for 20% of the effort (for a newbie). Rust is definitely the better language, and once you master it you can be even more productive in it than Go. If you're company is trying to decide between Go and Rust - and are having a hard time deciding - then you're most likely better off using Go as it's easier and more opinionated. Trying to adopt Rust from zero experience can be a recipe for disaster.
19:00 you can have raw pointers with any values you wish even with null value. But only in "unsafe" sections you can dereference raw pointers. So, generally you can dereference null-pointer and crash your program with segfault or access violation, but only in "unsafe" sectoin.
16:00 this is true only for safe Rust without using standard library or any other libraries. Generally, Rust can't avoid race conditions, only data races because of standard library which has a lot of instruments to overcome borrow-checker limitations. We can rewrite such example in Rust using interior mutability (RefCell, Mutex/RwLock and atomic's) and the execution result of the example program will be also unpredictable.
One big counterexample for me is enums. (I haven't finished the video yet. Does this come up?) I constantly run into situations in Python or Go where I feel like an enum is really the best way to express something, and I miss having them.
It's not about language features. Rust has nice high level features but it's still a system level language. Most people never would want or need to touch one.
It is also about control, you can throw around Rc and not think about life time and ownership. But when you really need performance, you can always get that in rust without rewritting your project in a different language.
Incredible session. Sorry, but your answer about the ampersand 4:48 was not at the point. Rust variable is by default read only unless explicitly declared as mutable using `mut` keyword. Ampersand means the reference is borrowed not transferred, but keep that in mind that it is different from usual concept in C/C++, it has more to say, I would suggest the Rust book.
This guy just suggested... the rust book... to a Rust book author? Also that dude in the crowd was so annoying, randomly interjecting over and over. It's not a 1:1 conversation man... Ask your questions at the end!
@@Kaiwa1234 I care and respect the concept of Rust and I admire the community who built this language. I have told respectfully and if I was the author I would have been proud of the clarity the book serves.
"does it really make sense for me?" Any programming language that is so pedantically opinionated as to complain during compilation about my mere *naming convention* is not for me. Any language that complains about 'let mut x : f32 = 0' not being able to initialize a floating point value with 0 (which is losslessly identical to 0.0) is not worth my time. I just don't have time for nonsense. Dear Rustaceans, loosen your compiler's pedanticness (keep memory safety, but drop the pointlessly picky aspects) and lessen your sense of superiority about your language over others, and you will find significantly more people joining the ranks of your crowd. 👍 1:54 "Rust solves pain points ... with a limited number of downsides" 🤔 I really did hope for this to be a successor to C++, but the more I tried it, the more I realized it was a different language that fixes some aspects while adding in its own warts, rather than being a clear improvement/upgrade, as a number of those "limited downsides" are pretty darn annoying.
Naming conventions are increasingly more important when programs grow. Previously, this was often just documented somewhere in some "company sw engineering style guide" etc, as was things like tab vs spaces, placing of {} etc...Rust just enforces all of this, with the great advantage that all Rust code looks stylishly similar. Float initialization with 0.0 instead of 0. Yeah, it's pedantic, but then you can omit type and it infers it. Yes, it forces you to type let mut in variable declaration and &mut in both call and function signature when changing things, but these features...as an old C programmer I appreciate each and every one of those things, because "when it compiles, it works". Yes, I'm yet another Rust fanboy, guilty as charged :-)
9:31 the HashMap will allocate when you insert new entries into it, so that code isn't allocation free.
I think he clarifies that it doesn't reallocate parts of the string. It might allocate more space to store &str pointers as you say.
19:40 you can easily hide an error from the func by `let _ = func()` or `func().ok()`. But yes, Rust demands you to do it explicitly.
I skipped to the end of the talk. Conclusion: "I can't say if RUST is good for you." Of course. Only I know what I need.
Ty. Ima head out
Your book is one of the best resources available 🔥
Thank you for saying so!
Glad to see a presentation without meme or animated GIFs
For those comparing Go and Rust, look at it this way: Go is the best gateway drug to Rust.
Learning Go makes it easier to learn Rust if you don't have a C/C++ background. Go also offers 80% of the benefits of Rust for 20% of the effort (for a newbie). Rust is definitely the better language, and once you master it you can be even more productive in it than Go. If you're company is trying to decide between Go and Rust - and are having a hard time deciding - then you're most likely better off using Go as it's easier and more opinionated. Trying to adopt Rust from zero experience can be a recipe for disaster.
For sure learning curve impacts a lot those decisions. Here where I work we adopted kotlin because we were all Java programmers
I consider reliability benefits of Rust the most important and go offers maybe 30% of them, not 80.
I do not really get it why a garbage collected language is being compared to a non-garbage collected one.
Go should be compared to Java, Nim, etc
if our company had a lot of time, we would probably write a backend on Rust, but of course there is a better option - Go.
@@ykmnkmi does your company count debugging time towards the decision?
Tom slyly left out that Pattern Matching is in newer versions of Python lol. I’m def a fan of both
As far as I know Python's pattern matching is nowhere near the level of Rust or ML-like languages, most significantly there's no exhaustivity check.
@@yawaramin4771 for now
Amazing talk Tim. I remember meeting you at python meetups many years ago, it seems we have both transitioned towards rust.
Nice talk Tim. 07:06-07:11 love that part.. :D
You should include the Q&A in the videos. Those who are not interested can still skip it.
19:00 you can have raw pointers with any values you wish even with null value. But only in "unsafe" sections you can dereference raw pointers. So, generally you can dereference null-pointer and crash your program with segfault or access violation, but only in "unsafe" sectoin.
16:00 this is true only for safe Rust without using standard library or any other libraries. Generally, Rust can't avoid race conditions, only data races because of standard library which has a lot of instruments to overcome borrow-checker limitations. We can rewrite such example in Rust using interior mutability (RefCell, Mutex/RwLock and atomic's) and the execution result of the example program will be also unpredictable.
Nothing can avoid race conditions as opposed to data races. But actor frameworks or actor languages make it easier to avoid race conditions.
13:00 Most C++ compilers will give you a big warning though... (Not sure about C).
Most C++ compilers are also C compilers with a different driver in the same project, so the warnings are quite similar if not identical.
For most people there is no real benefit to write in Rust. It makes more sense to depend on stuff that is written in it.
Easy developing concurrent code
One big counterexample for me is enums. (I haven't finished the video yet. Does this come up?) I constantly run into situations in Python or Go where I feel like an enum is really the best way to express something, and I miss having them.
It's not about language features. Rust has nice high level features but it's still a system level language. Most people never would want or need to touch one.
@@realsong-fake lol
@@realsong-fake it started as a systems programming language. These days it can be successfully used in many more domains
Python is safe!?
Great video!!!
#rust
3:15 Python is not safe in my opinion, because it's a dynamic typed language which results to many runtime errors. Java would be a better example.
Thanks for the feedback! 👍 I've passed this along, internally, for review. 🧐 ^RS
While Rust may be the solution for certain edge cases I have found that Go works better for me. YMMV.
Just wish Rust had as good remote debugging feature as JVM and .NET for example.. 🤞
Not all is done at compile time. Many rust code uses some sort of smart pointera which are just another way of reference counter GC
It is also about control, you can throw around Rc and not think about life time and ownership.
But when you really need performance, you can always get that in rust without rewritting your project in a different language.
Rust is great until you have to fight with the borrow checker and manage lifetimes manualy instead of focusing on your program
"focusing on your program" should include weeding out memory management bugs as well
If you're fighting the borrow checker and managing lifetimes, you're probably architecting your program wrong.
Answer : Yes, it does
Incredible session. Sorry, but your answer about the ampersand 4:48 was not at the point. Rust variable is by default read only unless explicitly declared as mutable using `mut` keyword. Ampersand means the reference is borrowed not transferred, but keep that in mind that it is different from usual concept in C/C++, it has more to say, I would suggest the Rust book.
I try to teach one thing at a time. I don't want to introduce the term "borrowing" in the first 5 minutes of people's introduction to the language.
This guy just suggested... the rust book... to a Rust book author? Also that dude in the crowd was so annoying, randomly interjecting over and over. It's not a 1:1 conversation man... Ask your questions at the end!
@@Kaiwa1234 I care and respect the concept of Rust and I admire the community who built this language. I have told respectfully and if I was the author I would have been proud of the clarity the book serves.
@@timClicks I understand.
"does it really make sense for me?"
Any programming language that is so pedantically opinionated as to complain during compilation about my mere *naming convention* is not for me. Any language that complains about 'let mut x : f32 = 0' not being able to initialize a floating point value with 0 (which is losslessly identical to 0.0) is not worth my time. I just don't have time for nonsense. Dear Rustaceans, loosen your compiler's pedanticness (keep memory safety, but drop the pointlessly picky aspects) and lessen your sense of superiority about your language over others, and you will find significantly more people joining the ranks of your crowd. 👍
1:54 "Rust solves pain points ... with a limited number of downsides" 🤔 I really did hope for this to be a successor to C++, but the more I tried it, the more I realized it was a different language that fixes some aspects while adding in its own warts, rather than being a clear improvement/upgrade, as a number of those "limited downsides" are pretty darn annoying.
Naming conventions are increasingly more important when programs grow. Previously, this was often just documented somewhere in some "company sw engineering style guide" etc, as was things like tab vs spaces, placing of {} etc...Rust just enforces all of this, with the great advantage that all Rust code looks stylishly similar.
Float initialization with 0.0 instead of 0. Yeah, it's pedantic, but then you can omit type and it infers it.
Yes, it forces you to type let mut in variable declaration and &mut in both call and function signature when changing things, but these features...as an old C programmer I appreciate each and every one of those things, because "when it compiles, it works". Yes, I'm yet another Rust fanboy, guilty as charged :-)
i have doubt of those numbers 17:36 - 18:26
Potentially good talk ruined by (he/him)
Rust give you what none other language does: Borrow Checker :v