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

Go docs are pretty terse and lifeless, agreed.

Here's an example of Elixir docs: https://hexdocs.pm/ecto/Ecto.html

Note the layout, the amount of prose to introduce a module and the function documentation that is not limited to just a quick line but often has multiple examples and tries quite hard to be clear and extensive.

There is no reason Rust docs couldn't be that good, but the example has to come from the top: improve the std docs, and everything will follow suit.



ecto and phoenix are shining examples of well written docs but its hardly the standard for elixir as a whole. many of the docs for most libraries are just lists of functions. some might have a short description though you're usually relying on a dialyzer definition at best.


Fair enough, but neither Ecto nor Phoenix are part of the stdlib, but being written by the some of core language maintainers with such a focus on documentation, they provide a great example for everybody to follow. Having excellent docs on the core libraries, the main SQL datamapper and web framework is the reason why Elixir is so loved even though it's quite a niche language.

As a new Rust fan I would just love to have the std docs half as good as Elixir's. I constantly get lost in rustdoc.




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

Search: