5 ms·
I'm really loving Rust. I've been 100% C++ dev for work, and Rust is starting to gain internal traction. Go fell over as a replacement for our less resource in
by ilovecaching 8y ago
I'm really loving Rust. I've been 100% C++ dev for work, and Rust is starting to gain internal traction. Go fell over as a replacement for our less resource intensive applications because the lack of generics killed interoperability between it and C++. Rust wins in that area. My only fear would be Rust continuing to tack on features without every removing anything and turning into C++ 2.
C++ 17 is still really nice, the language is just old and C compat + lots of historically bloat makes it crusty. A better type system with more FP concepts and more safety is a win-win in my book.
- senorsmile 8y agoI'm curious. What sort of features would you not want to see in Rust?
- remram 8y agoCan't talk for the parent, but things like ..=, impl Trait (especially for arguments), new try/catch syntax, ... were pretty controversed (and that's among the accepted RFCs only).
- pornel 8y agoThese controversies were mainly bikeshedding names and syntax (vs `...`, `any Trait`, `do/fail`), but there was little opposition to the features themselves. There are some often-requested features (specialization, const generics, box syntax, placement new) that even got implemented, but are still unstable, because they aren't good enough. The bar is high. Plenty of RFCs get rejected: https://github.com/rust-lang/rfcs/pulls?q=is%3Apr+is%3Aclosed+RFC https://github.com/rust-lang/rfcs/pulls?q=is%3Apr+is%3Aclose... and even more "pre-RFCs" don't even make it past initial discussion in the forums. I think Rust is getting better over time in making ideas polished. The few warts it has so far (e.g. Error description() and cause(), struct literal parsing in `if`) are from before 1.0, and probably wouldn't get past the RFC process used today.
- blub 8y agoWhat do you mean by C++ interoperability (re Rust)? As far as I was able to determine a couple of months ago, there isn't really a good way of doing interop except by going through a C shim. The case I was analysing was Qt C++ UI plus Rust library. There's a Rust text editor (xi?) which is using JSON to communicate between the UI and the core. In that case I believe it was designed like that to allow for different UIs, but it looks more appealing than the C interface.
- steveklabnik 8y agoBindgen has grown support for enough C++ to be able to bind to Spidermonkey, but it's far from full support.