On 19/02/14 09:14, Phil Dawes wrote:
I understand, but it seems like a bad tradeoff to me in a language
with safety as a primary feature.
'.lines()' looks like the way to do line iteration in rust, so people
will use it without thinking especially as it is part of the std.io
<http://std.io> introduction.
I agree. IO is certainly an area where you want to know that ALL errors
are propagated upwards. Even with the best of intentions, it's very
easy to write IO functions that handle 20 cases, across 5 levels of
abstraction, and inadvertently not handle all failure conditions for one
particular case. It may not even matter for the purposes of the
original code, but can later bite you pretty hard, when you come to add
functionality, and find that something is missing from your API to
handle the more general case correctly.
At the moment, Rust would have to get a red mark on this table:
http://en.wikipedia.org/wiki/Comparison_of_programming_languages#Failsafe_I.2FO_and_system_calls
Which would be quite sad, considering its goals.
IMO, this should be acknowledged as the simple oversight that it is, and
fixed.
--
Lee
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev