<< Back to previous view

[CLJ-454] docstrings for special ops Created: 08/Oct/10  Updated: 08/Dec/10  Resolved: 29/Nov/10

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: Release 1.3

Type: Enhancement Priority: Minor
Reporter: Assembla Importer Assignee: Chouser
Resolution: Completed Votes: 1
Labels: None

Attachments: Text File 0001-Make-doc-support-docstrings-for-special-ops.-CLJ-454.patch     Text File 0001-Move-doc-and-find-doc-to-repl-support-docstrings-for.patch    
Patch: Code
Approval: Ok


"If someone wants to submit a patch with doc support for the special ops, I'll take it, as long as they contain links to the full docs and aren't too long themselves" – rhickey

From here: http://clojure-log.n01se.net/date/2010-10-08.html#10:10

Comment by Assembla Importer [ 10/Oct/10 2:42 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/454

Comment by Chouser [ 10/Nov/10 8:54 PM ]

Should doc, find-doc, print-doc, etc. be moved out of clojure.core into clojure.repl as part of this?

Comment by Chouser [ 13/Nov/10 9:57 PM ]

This patch updates doc to show docstrings for special forms and more useful URLs for Java interop special forms. Special forms that are not fronted by macros have docs in a private var clojure.core/special-doc-map which doc and find-doc use. This patch also has find-doc search namespace docstrings.

Comment by Chouser [ 13/Nov/10 10:23 PM ]

This patch is essentially the same as the other, but also moves doc, find-doc, and related code to clojure.repl. This is technically a breaking change, but since doc and find-doc are also added to clojure.main's list of vars to refer, anyone using a clojure.main's repl won't notice any difference.

Comment by Colin Jones [ 27/Nov/10 9:55 PM ]

I love this change. Having special form docs in the REPL will be really helpful for newbies.

A couple questions/comments on the second patch:

1. Moving it to clojure.repl makes a lot of sense semantically. I wouldn't guess many people use doc in their actual production code, but I'm guessing this would require updates to tools like autodoc.

2. In clojure.repl/doc, why use #'print-doc and #'special-doc rather than just the bare symbols for those functions?

Comment by Tom Faulhaber [ 28/Nov/10 12:36 AM ]

This is great. When these patches are applied, I'll add this stuff to the autodoc.

Generated at Mon Apr 24 21:56:22 CDT 2017 using JIRA 4.4#649-r158309.