News for hackers. Stuff that matters.
Re:Go 1.11 and Beyond by 013a on Saturday August 25, 2018 @11:59AM (#17841308)
One really minor, but powerful, thing I'd love to see from the Go team is a better designed documentation experience. Here's the Google-produced Github library godoc [1]; its absolutely horrendous to browse, as is any sufficiently large package. Compare that to Elixir's [2] auto-generated documentation. There's a lot of work that can go into just improving that static HTML and making it more easily grokable.

[1] https://godoc.org/github.com/google/go-github/github

[2] https://hexdocs.pm/phoenix/overview.html

Re:Go 1.11 and Beyond by weberc2 on Saturday August 25, 2018 @01:11PM (#17841591)
I've not used Elixir, but I'm surprised by the strong dislike for GoDoc. I've used Java, C#, C/C++, Python, and JavaScript and I've never found anything to be as nice as GoDoc.

In particular, Godoc is absolutely effortless. No build step in your project, no cryptic documentation syntax, no need to tell the documentation generator how to link to your dependencies' documentation pages, etc. Everything just works, and the output is quite a lot cleaner than the aforementioned as well.

No doubt there's a little room for improvement in how the text is layed out and organized, but it's still leagues better than all other documentation systems I've used. With Python (sphinxdocs) in particular, everything gets rendered into a giant page with no clues about what class's `__str__()` method I'm currently looking at.

Re:Go 1.11 and Beyond by 013a on Saturday August 25, 2018 @01:12PM (#17841600)
That's mostly what I mean. I love godoc and the philosophy behind it; its a massive improvement over the manual documentation build steps of Java, JS, Python, etc. But even more modern languages, like Rust and Elixir, do it better. There's a lot of low-hanging UX and usability fruit to be fixed in godoc which can make the experience better.
Re:Go 1.11 and Beyond by weberc2 on Saturday August 25, 2018 @07:18PM (#17843120)
Ah, I see. I guess I think of these UX improvements as “the last mile”, and it’s nice to have something that gets us 95% of the way there compared to everything else that makes you work to get to 40%.

Also, i’ve never found Rust’s docs to be very easy to read; maybe the complexity of the type system makes for a more challenging UX, or maybe my opinion is simply an outlier.

In any case, it’s good to know things can get even better. Thanks for sharing!

Re:Go 1.11 and Beyond by shazow on Saturday August 25, 2018 @12:33PM (#17841444)
Godoc is an excellent forcing function when it's not ignored. Designing your package's public namespace so that it looks sensible in godoc yields great results for consumers.
Re:Go 1.11 and Beyond by urtrs on Saturday August 25, 2018 @12:26PM (#17841423)
I prefer godoc. It is concise and I can find faster what I am looking for.
Re:Go 1.11 and Beyond by the_duke on Saturday August 25, 2018 @02:01PM (#17841791)
I really prefer the Rust auto-generated documentation to both Godoc and Elixir docs.

See for example https://docs.rs/diesel/1.2.2/diesel/pg/index.html.

Godoc is too plain and almost cumbersome to read for me, while Elixir is too pretty and not so efficient in displaying the type information in my opinion.

Rust has a happy middle ground here.

Re:Go 1.11 and Beyond by ainar-g on Saturday August 25, 2018 @02:23PM (#17841856)
It's funny how these things are so personal. I love Godoc, mostly because everything is on one page, with very little JS and a good, almost monochrome colour palette. At the same time, I really can't stand Rust's docs, because everything seems to get its own page, it's colours galore, and of course there is a sidebar.

The mileage does vary greatly apparently.

Re:Go 1.11 and Beyond by weberc2 on Saturday August 25, 2018 @07:20PM (#17843125)
Agreed on both your preferences and overall YMMV point.
Re:Go 1.11 and Beyond by thefounder on Saturday August 25, 2018 @12:36PM (#17841452)
Godoc compensate by being more functional. The elixir example is missing links to the source code of the functions/methods etc. Godoc also generates an excerpt with all the functions/methods/types in the package.
Re:Go 1.11 and Beyond by q1t on Saturday August 25, 2018 @01:51PM (#17841752)
ExDoc does not miss links to the source code. (Click on any Module/function and there should be brackets "<>" that point to the source code.) Types are also present in any module that defines them.
Re:Go 1.11 and Beyond by agnivade on Monday August 27, 2018 @04:21AM (#17850144)
Hi,

godoc maintainer here. We have a lot of UI improvements coming for 1.12.

- A TOC at the top

- A sidebar for easy scrolling

- More cross-links for easy navigation.

If hotlinking comes through, that's a major improvement in itself.

Stay tuned !