5 ms·
I'm not trolling. I'm genuinely curious. I've always thought of languages just as tools and have never been fanatic about a particular one. I personally like C
by felipemnoa 6y ago
I'm not trolling. I'm genuinely curious. I've always thought of languages just as tools and have never been fanatic about a particular one. I personally like C and Java but have no problem using other languages if they are the best for the job.
I'm really curious to know what makes rust so special? Mind you that I know nothing about it.
- lights0123 6y agoAlgebraic data types[0], compile-time thread safety guarantees[1], async/await on embedded[2], type inference that can work backwards[3], blocks are expressions so you can return values from if statements[4], returning from while(true) loops[5], and iterators[6] that don't kill performance[7]. [0]: https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html#enum-values https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html... [1]: https://doc.rust-lang.org/book/ch16-04-extensible-concurrency-sync-and-send.html https://doc.rust-lang.org/book/ch16-04-extensible-concurrenc... [2]: https://lights0123.com/blog/2020/07/25/async-await-for-avr-with-rust/ https://lights0123.com/blog/2020/07/25/async-await-for-avr-w... [3]: https://doc.rust-lang.org/book/ch03-02-data-types.html#data-types https://doc.rust-lang.org/book/ch03-02-data-types.html#data-... [4]: https://doc.rust-lang.org/book/ch06-02-match.html#the-match-control-flow-operator https://doc.rust-lang.org/book/ch06-02-match.html#the-match-... [5]: https://doc.rust-lang.org/book/ch03-05-control-flow.html#returning-values-from-loops https://doc.rust-lang.org/book/ch03-05-control-flow.html#ret... [6]: https://doc.rust-lang.org/book/ch13-02-iterators.html https://doc.rust-lang.org/book/ch13-02-iterators.html [7]: https://doc.rust-lang.org/book/ch13-04-performance.html https://doc.rust-lang.org/book/ch13-04-performance.html
- rexdexpl 6y agoHmm, have you ever finished any real world scale product in it? All those things you mentioned are mostly toys that mostly inexperienced programmers are only excited with. RUST lacks in real world scalability and applicability, it's still toy language even after years of development.
- steveklabnik 6y agoThe foundation member companies are some of the largest technology companies in the world, and are using Rust at scale.
- lights0123 6y agoCritical parts of AWS's Nitro are written in Rust, which powers all of their new high-performance computing—is that a "toy"? What about Dropbox's sync algorithm? You know, the one that runs on every computer with Dropbox installed that is their core business logic, powering file storage for more than 0.5B users? Firefox's Stylo and other parts? They still have hundreds of millions of users.
- pca006132 6y agoI think there are quite a lot of real world scale projects written in Rust... At least for me as an embedded developer, Rust is really superior to C/C++. Although the ecosystem is not that mature and lacks vendor support, it is easier to read/write in Rust and expect the code to work. Do you have any features that you think experienced programmers are excited with? Or features that are required to provide real world scalability and applicability?
- volta83 6y agoI worked on two Rust projects over 500k LOC, one 800k LOC and one that's now at 1.5 million LOC. Number one feature versus Kotlin, C++, C#, C, Haskell, Python, Ruby, etc. is how easy it is to refactor large-scale Rust code bases safely. Refactoring a large C++ code-base is almost impossible to do correctly without introducing lots of bugs, undefined behavior, security vulnerabilities, etc. We did a major refactor (completely parallelized an ~700k LOC application) in a relatively short span of time (6 months) in Rust without issues. We are also not the only ones that did this. Mozilla tried to parallelize Firefox using C++, and this failed so hard, that they actually chose to develop Rust far enough first, to be able to do that in Rust instead, and all that work actually landed on Firefox a couple of years ago already. I wouldn't consider Firefox a "toy" project.
- lmm 6y agoIf you've never seriously used an ML-family language then you don't know what you're missing. Lots of popular languages are in a very narrow slice of the language space; you talk about "other languages" but you only mention C and Java which are very similar languages to each other in many respects.
- kortex 6y agoI learned VB, Java, python, "C++", C, JS, go, rust, "Real" C++, in roughly that order. The first c++ is basically writing c with classes. Enough to write Arduino stuff. The latter is learning modern ish c++14. Smart pointers, copy and move constructors, lots of boost, move semantics (I still don't grok &&). Also, interfacing with c++98 and C drivers. On top of that, Cmake for building complex c++ projects. I thought rust had a steep learning curve and borrow mechanics were hard. Boy howdy, "Real" c++ makes rust look like a cake walk. C++ has basically all the borrow mechanics of rust, it's just verbose, tedious , idiosyncratic, and bolted on. Plus umpteen other ways to pass data around. The package and build system just works. IMHO The "only" real advantages c++ has over rust are momentum, availability, and the ability to natively use C can code. The mind share, library ecosystem, and ubiquity are unmatched. However I see a point where wrapping FFI becomes easy enough that this last advantage becomes a draw. The second is fixed by more compiler support. Compared to Java, rust is less verbose, faster, less memory, and better abstractions, though I haven't touched Java in 5 years. The rust experience is so much better than C++ that I see it continuously eating into mind share. I think the joy comes from the relief of frustration of working with automatic foot guns for years.
- deleted 6y ago[deleted]