I've been thinking about inline documentation and documentation-in-REPL, and I came up with the following ideas:
1. If there's some kind of unique per-compiled-function identifier that is consistent across runs, this can be used to look up documentation in an external file. If a tool is made to scrape doc comments and produce this database, then there will be no runtime bloat if the documentation is never accessed.
2. It doesn't seem to be a big deal to bloat interpreted functions, though making interpreted functions keep their documentation comments would require a kind of weird and non-trivial extension to the reader. BUT, it would still be really cool.
3. Python-style doc strings, _if_ the compiler knows to optimize them out, would be a simple solution and wouldn't require a strange reader. e.g.
(define (map proc l)
#<<END_OF_DOC
(map proc l)
Does such and such...
END_OF_DOC
...)
Thoughts?