rhombus-prototype icon indicating copy to clipboard operation
rhombus-prototype copied to clipboard

[wishlist] Make Matthew's doc-define from ClojureWest keynote real

Open spdegabrielle opened this issue 5 years ago • 6 comments

from Wishlist of backwards incompatible things for a future Racket2. #33

spdegabrielle avatar Jul 22 '19 11:07 spdegabrielle

Is there a link to this reference/video?

pmatos avatar Jul 24 '19 07:07 pmatos

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)

sorawee avatar Jul 24 '19 07:07 sorawee

slide 149:

In-Source Scribble Documentation

Screenshot 2019-07-24 at 19 42 04

spdegabrielle avatar Jul 24 '19 18:07 spdegabrielle

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.

zlee-personal avatar Jul 29 '19 19:07 zlee-personal

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).

benknoble avatar Sep 16 '21 11:09 benknoble

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.

diego-crespo avatar Dec 08 '21 03:12 diego-crespo