6 ms·
I completely agree. I wish the author had mentioned one of the other replacements for C++, like D, Go or, as you mentioned, Rust. C++ can't be fixed by adding
by beatgammit 14y ago
I completely agree. I wish the author had mentioned one of the other replacements for C++, like D, Go or, as you mentioned, Rust.
C++ can't be fixed by adding to it. That's how it got so unmanageable in the first place. Personally, I just write in C when I need performance, but then again, I don't work on large projects that need raw speed.
For me, D and Go are good enough. They beat the pants of any interpreted language, and they offer compelling features not found in C++ (like simplicity, have you seen D's templates? Work of art...).
- tikhonj 14y agoI don't think Go is any more appropriate as a comparison to C++ than Java or C# are. After all, Go essentially competes in the same space as Java and C#--it's a managed imperative language designed for use on a server. Now, D and Rust are another story. After doing a bit of reading, I'm actually very excited about Rust. For me, Go is essentially completely useless: it fills the same niche as Java, C# or--far more importantly--Haskell or OCaml. If I need code that's relatively fast but don't want to sacrifice memory safety or the convenience of a high-level language, I can do much better than Go. On the other hand, if I want really low-level access to the system, for whatever reason, I don't have many good choices. I could do C, but that's rather unsafe and unpleasant; I could do C++, but it's a gigantic, overly complex language and also rather unsafe and unpleasant and I could do D. (I've actually heard good things about D but have never tried it.) Rust gives me the perfect alternative--a simpler, higher-level language that's more pleasant to use but still lets me operate at a relatively low level. So next time I need to do something like that (which, honestly, probably won't be soon), I'm almost definitely going to use Rust, even if it's in active development and changing all the time. EDIT: In re-reading this comment, I have realized that "high-level" and "low-level" really aren't great terms (at least the way I'm using them). Particularly, they're not mutually exclusive: a language can both support a high level of abstraction and provide low-level systems access where needed. Of course, I can't think of any language that actually does this, but Rust seems very promising.
- acqq 14y agoIf you're doing anything serious, you need something that is going to compile even when compiler changes from version to version, unless you plan to write only a few lines, when it doesn't matter which language is used anyway. That's why I don't understand your argument for Rust. I'd vote for D.
- shmerl 14y agoRust got into more stable state with the last release.
- pcwalton 14y agoRust feature freeze is soon. These days we reject probably 90% of the proposals to incompatibly change the language. There will still be churn, but it's much smaller nowadays; once we hit 1.0 we will be committing to backwards compatibility.
- Dn_Ab 14y agoI'm also really excited about Rust. What would be unimaginable exciting would be if Rust has any plans for iPhone or Android devices. Preferably without a 10MB runtime and a decent debug story. Elsewise, absent the runtime,F# is the most interesting language closest to fitting that bill.
- pcwalton 14y agoRust definitely has Android support planned.
- eliasmacpherson 14y agoIf you look at what's been added and removed from C++ and the C++ STL as of C++11, there are changes required to get formerly valid code to compile under it too. noexcept() as a replacement for throw() in particular. I'm sure Rust has a lot more frequent changes though.
- hamstergene 14y ago