DEV Community


Discussion on: It seems like Rust software is bad

davidedelpapa profile image
Davide Del Papa

I think comparing SLOC between different languages is not a good metric at all. For example, if in Rust you match a lot, it will increase even up to 200% the line count (or even more). However, the advantages of such a strategy are huge. Just remember that the focus of Rust as opposed to other languages is security, otherwise we could get rid of the borrow checker altogether.
Of course if you write lots of unwrap() the line count gets smaller, but in a library this strategy is not appropriate; therefore the line count gets larger and larger.

yujiri8 profile image
Ryan Westlund Author

Those are good points, but at least when comparing to Go I thought it would be meaningful because one of the main things I prefer about Rust over Go is the addition of shorthands to deal with errors.