rhombus-prototype
rhombus-prototype copied to clipboard
[wishlist] Make Matthew's doc-define from ClojureWest keynote real
from Wishlist of backwards incompatible things for a future Racket2. #33
Is there a link to this reference/video?
I think it refers to slide 149 at https://raw.githubusercontent.com/strangeloop/clojurewest2013/master/slides/sessions/Flatt-MetaprogrammingTime.pdf
Video: https://www.infoq.com/presentations/racket-metaprogramming/ (documentation stuff starts at 44:56)
slide 149:
In-Source Scribble Documentation
One thing I like about python is it's docstring system and help
function. Scribble is great for documenting a library, but not so great for describing helper functions in a file that don't get exported. Most people just use comments, but we may benefit from having a more standard way of describing functions, perhaps available at runtime with something similar to help
. I would enjoy having a tooltip pop up for a function, even one in the same file. Using scribble may be difficult for supporting tooltips (maybe), so maybe there could be a simple docstring in source, while scribble maintains it's html based interface with the user.
Clojure's define forms allow arbitrary metadata to be attached to a symbol in a map: if racket and/or rhombus had something similar, it could be used for standard things (docs, types, contracts, what have you) and also for more interesting things (which I have not dreamt of).
If we use scribble would that mean it would be possible to have executable code blocks within the documentation like Rust's Documentation tests? If so I think that would be great for the same reasons outlined on that page.