4 ms·
I have worked with very few C++ projects that compile fast, and my experience is that the errors in C++ projects are often more severe than the errors in Python
by klodolph 4y ago
I have worked with very few C++ projects that compile fast, and my experience is that the errors in C++ projects are often more severe than the errors in Python projects. Even with modern C++ smart pointer style, I’ve seen all sorts of stuff like dangling pointers / use-after-free, buffer overruns, etc. All in code that had been reviewed.
- melling 4y agoYes, C++ was created in the 1980’s and a lot had been added … That’s why I was suggesting newer compiled languages incorporating some of what we’ve learned over the past 4 decades. eg type inference
- PathOfEclipse 4y agoIn general, the more work the type system is doing for you, the slower the compilation speed. Kotlin and Scala, for instance, both compile far more slowly than Java. I think even C# compiles very slowly compared to Java. You mention type inference, but type inference actually slows down compilation, and the more sophisticated the type inference, the slower the compilation! Similarly, Rust compilation speed is much slower than GoLang's, whose type system does relatively very little for you. I haven't seen exact numbers, but I've seen people say Rust and C++ have similar compilation speeds, and both are, in general, slow to compile.
- cestith 4y agoRust gives you so much more for the same compilation speed though.
- tomovo 4y agoTry any larger Swift project and suddenly C++ looks pretty fast. Agreed on the pointers though.
- galangalalgol 4y agoIn my experience a good pipeline with decent unit tests makes c++ and python work fine.
- ahartmetz 4y agoAnd Valgrind (and / or Memory Sanitizer), they mostly remove a big source of problems in C++ code.