Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C had a Reference Manual (e.g. https://archive.org/details/crefman/cman74/ and https://www.bell-labs.com/usr/dmr/www/cman.pdf) which was included as an appendix in the 1st edition of K&R. That was effectively the specification through the 1980s.

At about the time K&R1 was published, the Ritchie's original C compiler was being replaced by pcc, and `lint` was another early (diagnostics-only) implementation. The K&R1 reference manual includes a few mentions of features that were deprecated by pcc, or new in pcc.

So I think C was more mature than "the compiler is the specification" by the end of the 1970s.



I would say that, on the whole, doc.rust-lang.org serves a similar purpose to K&R. It's a comprehensive tutorial, a good guide for the standard library, and a good start for a reference but not strictly a complete definition of the language.

K&R is remarkable for fitting all that into one slim book, and Rust's documentation rightly doesn't try.

Rust's documentation also has some considerable advantages from its modernity. That library documentation gets to link to the actual source code which can answer tricky questions you'd never cover in a book, yet in many cases that source is very readable, its examples are something you can try for yourself with one click, instead of one of the very best human compiled indices of any book it has text search and hyperlinks.


Beware of reading the library sources though, they can change any time without warning. Only the docs are guarantees that remain stable as Rust gets updated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: