Documenting elements of a struct

I agree that struct fields should be considered implementation details unless specified otherwise, but I find that documenting things that are not part of the API is also useful. I docstring a lot of internal functions, type specs, and fields, so that when I come back to the code 2 years after I wrote it I can navigate it better. Also, this helps potential contributors.

11 Likes