3 ms·
In Elixir the code inside comments is tested so it cant go stale.
by scns 6y ago
In Elixir the code inside comments is tested so it cant go stale.
- Cthulhu_ 6y agoIn 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 https://blog.golang.org/examples
- jerf 6y agoArguably 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.