Lars Bergstrom - Beyond Safety and Speed: How Rust Fuels Team Productivity
Vložit
- čas přidán 15. 06. 2024
- We often talk about how Rust enables anyone to build software that is safe, fast, and concurrent. And, we frequently highlight all of the incredible tools from the compiler to cargo to an ever-growing suite of associated projects that aid the developer. Here, I'd like to talk about how all of this translates into productive teams that run leaner, deliver faster, and spend less in ongoing maintenance than ones working with legacy native systems languages.
- Věda a technologie
Kotlin mentioned.
Lars please go to Nvidia Next and make them use Rust
and force them to open source it
No. We need them to have more memory safety bugs in the firmware so that we can exploit them and RIIR on our own
@@RenderingUser I doubt they will do that as they are market leader
Good Talk. Missed a proper comparison with Go though
Is he comparing new development in go to a rewrite in rust?
sure seems like it lol
He's comparing rewrites in C++ with rewrites in Rust.
Google has a lot of very old legacy C++ code. I assume that's not true for Rust given that it's a new language and adoption at Google has been a recent thing.
So it's not clear to me if he is comparing productivity on very old C++ codebases full of legacy and history, with new codebases written in Rust. Because those would be two completely different dragons.
I thought something along those lines, but Lars also mentioned that the code once re-written in Rust is easier to maintain with the language. I think that would be my main point about it. I have written some C++ for a couple of years and looked into Rust. Rust has more orthogonal concepts and also not the huge historic payload C++ has. For instance algebraic data types and optionals are a powerful feature that allows software to be built like lego brickstones on top of each other. You can easily add concepts or erase them without breaking too much of the rest of your code. With some effort you can also do this in C, but it is very much harder. You cannot use the chassis, you have to wield it first. But doubly-linked lists are for sure easily understandable in C 😊.
A really interesting trend I've noticed is even people who hate Rust far prefer other people write in it if they need fo work together. It's all well and good to have some other language (C, Python, Zig, Java, anything) that you might be faster in, hut your 20% extra productivity is immediately lost in how you work with other people.
And when you consider that you from fhe future is a different person, Rust becomes a complete no-brainer.
"Go Forth" lmao
Now i wish there'd be a company in switzerland i could work for with rust ngl
How does writing in Rust help with not having to update the code? It's not clear from this video that there is any maintenance gain other than saying the code is just easier to understand which is highly subjective. Libraries will change. APIs will change. Hardware will change, so why would your rust code require less updates?
There are quite a few angles to answer this from. It all comes from the strong type guarantees.
Having a strong type system with low-cost enums and exhaustive branching means you can get compile-time guarantees about whether you've properly changed all the places that would need to know about this new update. I don't write modern C++, so I can't speak on it too much, but my understanding is that it lets you make changes not backed by strong type signatures, so you can have what feels like "dynamic typing" of enumerated values. You can add a new option, but you don't need to exhaustively handle this new enum case in different parts of your code.
The point is you can fearlessly refactor it with compiler making sure you don't break anything (logic errors may exist obviously)
@@brukts3361 Thanks. Interestingly I reached out to the creator of the video and he snarkily refused to answer me. I appreciate not everyone in the Rust community is like him.
@@joaodiasconde thanks.
@nickjunes well, you are putting words in his mouth that he never said (he did not say rust code needs fewer updates, his main point was that rust code is cheaper to update). So what do you expect?
powerpoint is so small
So like is Rust just the best shit ever invented or what… I’ve made a few loaders and a PE parser as my first rust projects and like I’m not convinced this is the savior language.. performs the same, if not slower than my c code… and takes 10x longer to complete due to its insanely freaky deaky syntax and the base language it self outside of third party crates is extremely bland… I don’t even think you can natively interact with Windows process using rust without installing another crate lmao
It sounds like you consider having a bunch of stuff in the std library a good thing. There are good arguments against that, no?
@@ClearerThanMud a bunch of stuff in the std? You mean having a native way to interact with the OS without installing third party crates, then yes.. I want that
If only they were not obsessed with C++ and made it actually productive and readable. And stand on it's own and not just C++ "competitor".
That's the thing, it's more of a competitor to Go/Java/C# than people think, Zig is the real competitor to C and C++. Rust provides a toolset that can be significantly different and more high level than C/C++ and still maintain performance and low level capabilities.
That's a reason Linux allowed Rust and not C++, because even with RAII, C++ cannot be compared with GO or Java. The "problem" is that C/C++ has been basically the only way to write performant applications even when it's not a great fit in level of abstraction or toolset, and now that Rust exists, people believe it's encroaching upon the problem domain C/C++ has largely been undeservingly dominant in.
@@anonymousalexander6005 Being as productive as Go/Java/C# doesn't stop Rust from competing with C/C++. Rust is a zero-cost ahead-of-time no-runtime language that compiles to lowest level, same as C and C++. While the type system and other language features make Rust more high-level than Go and Java, and almost as equal as Haskell.
@@anonymousalexander6005 C/C++ deserved to be dominant because they were the best. rewriting history is silly. maybe we have something better now, which is awesome. That doesn't suddenly mean C/C++ were bad choices in the older landscape.
You seem to have successfully anɡered people on the internet, seeinɡ as you ɡot ThePrimeaɡen to speculate on your comparison methods without watchinɡ a sinɡle second of your ɡreat talk :p
avatar checks out.
Theprimagen still wasn't wrong though.
It's all anecdotal still. Fresh rewrite of a legacy codebase is easier to read? Shock.
You could rewrite that in c++ and people would say the same thing, the language had less to do with the readability. Probably the skill issue of colleagues.