Clojure

docstrings for special ops

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code
  • Approval:
    Ok

Description

"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

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/454
Hide
Chouser added a comment -

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

Show
Chouser added a comment - Should doc, find-doc, print-doc, etc. be moved out of clojure.core into clojure.repl as part of this?
Hide
Chouser added a comment -

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.

Show
Chouser added a comment - 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.
Hide
Chouser added a comment -

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.

Show
Chouser added a comment - 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.
Hide
Colin Jones added a comment -

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?

Show
Colin Jones added a comment - 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?
Hide
Tom Faulhaber added a comment -

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

Show
Tom Faulhaber added a comment - This is great. When these patches are applied, I'll add this stuff to the autodoc.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: