News for hackers. Stuff that matters.
Re:Go modules have a v2+ problem by scns on Thursday September 10, 2020 @08:16AM (#24431548)
In Elixir the code inside comments is tested so it cant go stale.
Re:Go modules have a v2+ problem by Cthulhu_ on Thursday September 10, 2020 @08:17AM (#24431557)
In Go the example code is (can be) part of the source as well, and shown as executable in the documentation viewer: https://blog.golang.org/examples
Re:Go modules have a v2+ problem by jerf on Thursday September 10, 2020 @09:17AM (#24432052)
Arguably another feature that could use some shouting from the rooftops. I see it fairly rarely from public packages, and it's something a lot of public packages really ought to have. Little example snippets for specific functions are great, but round-trip, top-to-bottom examples of using your code base are very useful.