> A lot of the increase in line count can be explained by rustfmt’s formatting, as it likes to spread code out over multiple lines [...] The rest is additional features. Also note that our Rust code is in some places a straight translation of the C++, and fully idiomatic Rust might be shorter.
Having to handle every case of every branch also probably balloons line count.
Efficient LOC is not a goal of rust at all anyway.
I do plan to add something similar to Clojure's spec though, so the compiler can at least be advised about things and warning if stuff is missing.
But I do agree, any statically typed language should have that check and not just warn about it. It should be a hard error, no questions asked. And I love that Rust didn't relegate it to a warning that could be turned be into an error.
Since there are quite many contributors, it can be difficult to introduce some advanced macro requirements for the project, which could reduce the code.
Also, here's a code size tracker that counts tokens not lines, which is a better measure: https://github.com/rrethy/tcount