Skip to playerSkip to main content
  • 2天前
文字稿
00:01I mean I've tried a bunch and a lot depends on what I'm doing. If I was
00:06writing low-level device drivers I'd probably write it in Rust. If I was
00:12writing you know some large system that was doing things like building complex
00:21data structures for an autonomous vehicle to navigate an environment I
00:27would almost certainly do that in Java. You know a lot of people use say Python
00:32because it's really easy to learn but if you benchmark the performance of Python
00:38versus Rust or Java it's very slow. If you need performance Rust or Java are
00:45better. If you need the kind of very tight safety critical stuff that Rust
00:50provides and you know it's it's a small focus piece of code where having
00:56something go wrong is expensive then Rust is a good choice.
01:03Well you know Rust has I think a justly earned reputation of being hard to learn
01:11and because it's it's it's really oriented around safety and you know type safety
01:20memory safety thread safety all of that and you have to approach your problem your
01:28problem like you are theorem proving. So if you are doing small pieces of code
01:38like like a device driver you know it works really really well. If what you need to do
01:48is build a large complex system with very complicated dynamic data structures Rust gets harder and harder to use and
02:03so the
02:04question always has to include so what's the domain you know if you were doing
02:10something like building a math library or building a device driver for Linux you
02:20know Rust is a good choice. If I was building a large accounting system something
02:26that manages a store or something I would never use Rust. I mean you could it would
02:32just be painful.
评论

推荐视频