Docstrings: Imperative or indicative mood?

The Julia manual recommends imperative mood:

The one-line sentence should use the imperative form (“Do this”, “Return that”) instead of the third person (do not write “Returns the length…”) when documenting functions.

So let’s go with that.

16 Likes