6 ms·
The final code is longer because Rust's standard I/O is a lot more minimal than Python's, Fortran's, and even C's. If you use a library like [text_io], which pr
by giornogiovanna 8y ago
The final code is longer because Rust's standard I/O is a lot more minimal than Python's, Fortran's, and even C's. If you use a library like [text_io], which provides the equivalent of scanf, then I don't think that it'd be any longer.
[text_io]: https://crates.io/crates/text_io https://crates.io/crates/text_io
- semi-extrinsic 8y agoBut surely, having a sane way to do I/O in the standard library is one of the traits included in "Usability"?
- giornogiovanna 8y agoWhy does it have to be in the standard library when adding it as a dependency involves adding just a single line? Since (a) there's no one true way to do input parsing, and (b) most projects don't need to interactively ask for input, it doesn't sound like something that belongs in a standard library.