On 2/8/14 3:35 PM, Alex Crichton wrote:
We do indeed want to make common tasks like this fairly lightweight, but we also strive to require that the program handle possible error cases. Currently, the code you have shows well what one would expect when reading a line of input. On today's master, you might be able to shorten it slightly to:use std::io::{stdin, BufferedReader}; fn main() { let mut stdin = BufferedReader::new(stdin()); for line in stdin.lines() { println!("{}", line); } } I'm curious thought what you think is the heavy/verbose aspects of this? I like common patterns having shortcuts here and there!
Is there any way we can get rid of the need to create a buffered reader? It feels too enterprisey.
Patrick _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
