4 ms·
"Code is read much more often than written" ;)
by ahartmetz 8y ago
"Code is read much more often than written" ;)
- steveklabnik 8y agoI think ? is a perfect example of Stroustrup's Rule: https://thefeedbackloop.xyz/stroustrups-rule-and-layering-over-time/ https://thefeedbackloop.xyz/stroustrups-rule-and-layering-ov... > For new features, people insist on LOUD explicit syntax. > For established features, people want terse notation. I was pretty against ? when it was proposed. I liked try!. I thought ? was hard to read. I thought try! was concise enough. After writing (and reading) lots of code with ?, I'm all in. Heck, ? still isn't extendable for user-defined types, and now I want that! We made ? work in main, and in tests. It's now one of my favorite features of Rust. YMMV.
- moosingin3space 8y agoRust seems to follow Stroustrup's Rule very well as a community. Might explain why I like it so much.
- ahartmetz 8y agoFWIW I don't disagree with Rust's choice, I was just answering the question of parent. I am reading Blandy and Orendorff's Rust book and violently agree with almost all design choices, as an experienced C++ programmer.
- steveklabnik 8y agoNoted :)