5 ms·
Can somebody explain for what kind of use cases would this be helpful to use?
by kamaal 12y ago
Can somebody explain for what kind of use cases would this be helpful to use?
- steveklabnik 12y agoAny time 'it matters'. There's lots of stuff that we build, and we say things like, "Language X is slow, but it doesn't matter." "Language Y uses a lot of memory, but it doesn't matter." This is very, very often true. But every once in a while, it really matters. That's when you want something like Rust. When the details are important. When you need full control, but you'd like a compiler to help catch your mistakes. When a garbage collector has too much overhead. When you need to write something inside of Language X or Y, instead of a C extension, you can use Rust. Basically, anywhere you'd use C or C++, Rust is a great fit. Elsewhere? Maybe, maybe not. Depends.
- robertfw 12y ago> When you need to write something inside of Language X or Y, instead of a C extension, you can use Rust. Are there any examples/discussion/information for interacting with rust from python, like you would a C extension?
- steveklabnik 12y agoI devoted a whole chapter of the book to Ruby/Python/node embedding: http://doc.rust-lang.org/book/rust-inside-other-languages.html http://doc.rust-lang.org/book/rust-inside-other-languages.ht... A Ruby gem in Rust was one of our earliest production uses.
- barosl 12y agoThere's a wonderful presentation on this topic: https://www.youtube.com/watch?v=3CwJ0MH-4MA https://www.youtube.com/watch?v=3CwJ0MH-4MA
- madez 12y agoRust is a systems programming language that runs blazingly fast, prevents nearly all segfaults, and guarantees thread safety.[1] So, if you care for low memory usage, execution speed or safety guarantees especially for hard-to-debug kind of errors, then Rust might be interesting for you. It offers low-level access like C or C++ but excels with vastly improved security. So, I'd take that step, and say that where C or C++ is used right now, you might want to use Rust in the future. [1] http://www.rust-lang.org/ http://www.rust-lang.org/
- blake_himself 12y agoIt's as 'blazingly fast' as Java: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=java http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan... or go: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=go http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan... Here's what it's not as 'blazingly fast' as: http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=gpp http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...
- steveklabnik 12y agoWe haven't paid any attention to those benchmarks in a long time. When we did, we even beat C and C++ sometimes.
- igouy 12y agoAre you paying attention to some other benchmarks that you could share when responding to these questions? Just trying to dismiss measurements that are publically available, without putting forward something you consider better, is kind-of…
- steveklabnik 12y agoNo, as optimizing performance hasn't been a focus, shipping good language semantics has been.