I thought the opposite: header files (and CMakeLists.txt, which was included in the subtotal SLOC) artificially increase C++ SLOC.
> For example idiomatic Rust code can do with less defensive programming due to language features.
Can you show an example in the Rust code where this might be possible? https://github.com/quick-lint/cpp-vs-rust/tree/master/rust
I know that the comparision here is a line by line comparison, but Rust gives a more stable interface for reusing libraries than C++.
It would be a great experiment to use lots of external libraries. You might find that the code doesn't get slower (build times would probably go up though )
How would Rust LinkedVector's implementation have fewer lines than C++'s linked_vector?
> It would be a great experiment to use lots of external libraries. You might find that the code doesn't get slower (build times would probably go up though )
Build times going up is a great reason why I would not use external libraries!