6 ms·
> other viable systems programming languages simply did not exist (now you at least have Rust as a possible contender). (I have no horse in this race) But if a
by hawk_ 5y ago
> other viable systems programming languages simply did not exist (now you at least have Rust as a possible contender).
(I have no horse in this race) But if a big part of their complaint is compile times, Rust may not be the best example of a contender.
- spoiler 5y agoRust incremental (and debug) compilation times aren't that bad, though. It almost feels like a mindlessly perpetuated rumor at this point. Sure, it's kinda slow when compared to something like Go, but the amount of extra work rustc does compared to pretty much every other compiler is very big. Taking this into account, I can forgive it. But even with all that said, Rust has a compiler performance team that is constantly trying to improve things and keep track of regressions. I dunno if C++ implementations (eh gcc) have something similar? But yeah, at the end of the day, I think compilation times are important, but not as important as some other aspect of the language... Like, in C++ you can't even catch some errors until you start compiling and it fails in template expansion, while I usually don't have to compile Rust until I'm checking business logic. This allows me to focus on the problem at hand, not the language.
- xedrac 5y agoAs someone who loves Rust and uses it daily, compile times are abysmal, even compared to C++. It's the sole reason I bought a 32-core workstation. But you're right, when iterating, incremental compilation times are reasonable enough. Compile time is a very small price to pay for all the developer time that is saved over the life of the project.
- djdjfhsje33edh 5y agoHave you tried the mold [1] linker? It's a drop-in replacement with a single cargo config change and gave me a massive speed-up (> 10x) for incremental debug builds of a large project with around 450 dependencies. [1] https://github.com/rui314/mold https://github.com/rui314/mold
- ReactiveJelly 5y agoC++ makes me miss `cargo check`. Sure, Rust compiles slower, but in C++ I have to wait on a slow compile just to find something dumb like a typo. And it doesn't even have the borrow checker. I have to make an exe that doesn't work to see if I made one typo. And then the errors are so bad.
- maxnoe 5y agoTry ccls
- jcelerier 5y ago... your C++ IDE does not show the errors as you type ? If you're using sub-par tools by choice you cannot complain..
- dureuill 5y agoI never found a C++ IDE capable of understanding our root CMake project so it can gives us autocompletion and inline errors. We have a root project that's fully CMake, that orchestrates our sub libraries (also using CMake, declared with ExternalProject_Add) so the dependees are built before their dependents (and also to handle final packaging). The subprojects are added as git submodules. I tried VSCode and QtCreator but none of them seem to support CMake multi-projects defined in this way. I have to create a build directory per subproject, which can be painful when we have so many subprojects.
- jcelerier 5y ago> We have a root project that's fully CMake, that orchestrates our sub libraries (also using CMake, declared with ExternalProject_Add) well, those are not sub-libraries but external projects with their own build-system. I have sublibraries in submodules and add them with add_subdirectory and everything shows and is auto-completed correctly.
- 5y ago
- dureuill 5y agoCurious what kind of code you have. Sure, we don't have anywhere close to our C++ codebase in Rust, but we did integrate with a library that's on the bigger side, and compile times of the Rust part have been negligible compared to the C++ parts.