6 ms·
I work as a C++ programmer. I would love to switch to Rust, but: (1) To my knowledge, it has only one implementation, which isn't surprising, given there is no
by yakubin 8y ago
I work as a C++ programmer. I would love to switch to Rust, but:
(1) To my knowledge, it has only one implementation, which isn't surprising, given there is no spec, so basically there is nothing to reimplement. As @sircmpwn put it:
> Rust doesn't have a specification
> Therefore all Rust code is undefined behavior
I mean, if something isn't specified in the docs and the compiler changes its behaviour in this area, is it a bug? There is no spec, so nope, but your program may still start malfunctioning.
(2) It has a lot of features, looks very complex, and complexity is something I want to avoid after seeing how ugly C++ can get.
(3) For now, there are more libraries available to use for C++.
(4) I don't follow its development very closely, but, from what I've seen, it changes pretty fast for a programming language and it's not something I like (in programming languages).
So for now I will continue learning more Python and perhaps in the future I'll look at Rust again.
- steveklabnik 8y agoThere is a second implementation of everything but the borrow checker. > I mean, if something isn't specified in the docs and the compiler changes its behaviour in this area, is it a bug? Since Rust is so strongly typed, we do have strong rules for many kinds of changes, even if there's no formal specification. That can only help with some things, but it does help a lot. > it changes pretty fast The key here is that the changes are additive, that is, we don't make egregious backwards incompatible changes. We do sometimes for things like soundness fixes, but even then, we have tooling to estimate the impact of breakage on the ecosystem, and have strategies for easing that pain. Most users report that their code never breaks, and virtually all of the users whose code has broken report that it was trivial to get building again.
- now 8y agogets
- steveklabnik 8y agoI’m not sure what you’re saying exactly. You’re referring to the inherently dangerous c function?
- wtetzner 8y ago> So for now I will continue learning more Python and perhaps in the future I'll look at Rust again. Python doesn't have a specification either. It's also relatively complex (even if the code looks simple), and while it might not change fast, the big changes that were made weren't handled particularly well (2 -> 3). The Rust folks seem to have learned a lot from other languages, both in terms of their successes and their failures. You can see this with things like Cargo, and how Rust editions are being handled. I'm not saying don't learn Python, just that if you're willing to use Python, then I don't think your arguments against using Rust are particularly compelling.