I'm slowly sliding toward a hot take that docstrings as usually implemented in eg Python and Lisp are a mistake in the large, because you have to put them between the function definition and the function code body. Make your docstring too big and you push them too far apart.
@cks What do you think of Go's approach of pre-function comments?

@carlana I think they're a generally good idea, especially because Go also allows package-level documentation and you can even put it in a completely separate file that may have no code in it¹. The one limitation is that if you get verbose in function/etc documentation it pushes the actual code apart, but there are tradeoffs everywhere.

(And Go's choice means you can naturally document non-function things too.)

¹ eg https://github.com/siebenmann/sinksmtp/blob/master/doc.go

sinksmtp/doc.go at master · siebenmann/sinksmtp

Sinksmtp is a 'sink' SMTP server, one that does nothing more than record incoming email. - siebenmann/sinksmtp

GitHub