4 ms·
Or use Rust to get all 3!
by awestroke 8y ago
Or use Rust to get all 3!
- pjmlp 8y agoThey still need a bit of work to improve the 3., specially against GC languages.
- semi-extrinsic 8y agoI'm sorry, but Rust certainly doesn't score high on usability. Compare e.g. the "Guessing Game" intro from the official docs, just look at how much more complicated both the code and the tutorial is as compared to how you would do the same in Python, heck even in Fortran: https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html https://doc.rust-lang.org/book/ch02-00-guessing-game-tutoria...
- adrianN 8y agoI don't think comparing 100 line programs is a good benchmark for usability. Most software is much larger and the design choices you have to make for a programming language should favor programs with at least a few thousand lines of code.
- pjmlp 8y agoThen try to do a few thousand lines of code in Gtk-rs, including custom widgets, the issues with borrow checker and internal mutable struct data accessible to callbacks is what lead to the creation of Relm.
- giornogiovanna 8y agoThe 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.