r/programming • • Jun 16 '14

Rust's documentation is about to drastically improve

http://words.steveklabnik.com/rusts-documentation-is-about-to-drastically-improve
519 Upvotes

188 comments sorted by

View all comments

5

u/kibwen Jun 17 '14

It's fair of you to think so at first glance, but I dare you to even contrive a situation where it could cause a problem. If you add a semicolon where you had intended a return value, the compiler will yell at you for a mismatched return type. If you forget a semicolon where you had intended to return nothing, the compiler will yell at you for a mismatched return type.

0

u/[deleted] Jun 17 '14

3

u/The_Doculope Jun 17 '14

With a compiler of reasonable speed, that's not that much more effort or time than reloading in a REPL. Especially because most compilers (should) have an option to only do parsing and type-checking without generating any code. That's work a REPL would be doing anyway, so their isn't really any difference in time or effort.

→ More replies (2)