6 ms·
I've made an honest effort with C++ >= C++11. The language has improved -- lots -- but there's just no getting around the fact that: - Most of the improvements
by teacup50 11y ago
I've made an honest effort with C++ >= C++11. The language has improved -- lots -- but there's just no getting around the fact that:
- Most of the improvements hellaciously leverage the hideous template system, and
- Actually writing template-leveraging libraries is an exercise in pain, repetition, and insanely slow compile times.
C++ won't be a "Rust-killer" (insert any other modern low-level type parameterized systems language here) until a human being can actually read and make sense of the C++ standard library without needing to decipher repetitive, often recursive, and almost always unreadable templates.
- vonmoltke 11y agoC++ also suffers from having become, essentially, three separate languages rolled into one: - "C with classes" that adds basic object-oriented features to C - A full-featured, compiled OO language similar to Java - A high-level language capable of generating low-level code at compile time (template metaprogramming) I don't think a person can become adept at all three simultaneously without essentially devoting themselves exclusively to C++. The language would be better served by concentrating on the middle. Roll the first one into the C standard and spin the third off into a separate standard, thus creating a low level -> high level continuum.
- frankzinger 11y agoHow does Rust's compile times compare with those of C++?
- steveklabnik 11y agoWe don't have a whole lot of data, but generally faster. I can't seem to find the blog post now, but someone ported their raytracer from C++ to Rust, and the compile time was... half? I think?
- phaylon 11y agoDo you mean this[1] port? I can't remember one that had statistics on incremental builds during development, unfortunately. [1] https://ruudvanasseldonk.com/2014/10/20/writing-a-path-tracer-in-rust-part-7-conclusion https://ruudvanasseldonk.com/2014/10/20/writing-a-path-trace... (See "Performance")
- steveklabnik 11y agoYes! That one. Right now, Rust only builds each crate in paralell, we don't support incremental re-builds within crates. There's an RFC already though, and build times are gonna be a big focus of the next release cycle or two.
- Manishearth 11y agoWait, really? Wow. I always thought Rust was slower to compile. Huh.
- steveklabnik 11y agoYeah, people say Rust is slow to compile, but when they say that, they aren't generally talking about C++.