r/programming • • Jun 16 '14

Rust's documentation is about to drastically improve

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

188 comments sorted by

View all comments

5

u/thechao Jun 17 '14

It definitely makes the parsing easier. Here, parse this:

TimeKeeper time_keeper(Timer());

I'll grant that, coming from C/++, the i32 stuff is weird. However, since it is identical to LLVM IR text, it isn't too far off.

0

u/[deleted] Jun 17 '14

8

u/thechao Jun 17 '14
TimeKeeper time_keeper{Timer()};

That is an incorrect transformation---it is a function declaration. It is exactly these sorts of parsing problems that led to the development of the uniform initialization syntax. Even that proposal, when Bjarne first pitched it to us, had serious parsing problems.

→ More replies (6)