Fork me on GitHub
#specter
<
2016-09-13
>
zane15:09:20

Is it possible to attach docstrings via defnav?

codonnell15:09:15

@zane IIRC the semantics are the same as clojure.core/defn

zane15:09:53

@codonnell: Don't think so. This doesn't compile, for example:

(defnav EXAMPLE
  "Docs!"
  []
  (select* [this structure next-fn])
  (transform* [this structure next-fn])
Whereas, this does:
(defn example
  "Docs!"
  []
  :ok)

codonnell15:09:04

@zane which specter version are you using?

zane15:09:36

[com.rpl/specter "0.12.0"]

codonnell15:09:46

@zane just took a look at the source; nope, no docstrings

zane15:09:59

Yeah. I looked at it too but wanted to confirm. Sad panda.

zane16:09:46

Thanks, Nathan!

mac21:09:55

This might be obvious and/or silly, but wouldn't specter be very well suited to query/update those application state atoms that all the web-frameworks use these days?

nathanmarz21:09:46

@mac I think Specter is extremely useful for web programming in general, as a DOM is just a big nested data structure

cjmurphy22:09:09

@mac Something that goes against that idea somewhat is to have the atom have its own internal organisation and way of querying updating, which is what Om Next does with its Idents. (Having said that I imagine Om Next would still benefit from using Specter).