On 30/10/13 16:54, Phillip Lord wrote:
"Jim - FooBar();" <jimpil1...@gmail.com> writes:
On 30/10/13 16:19, Mars0i wrote:
Still, I'm surprised. /Why/ can't I document a record type with a docstring?
of course you can...just add a :doc key in the record's meta :)

The OP is correct. He says "why can't I document a record type with a
docstring", rather than "why can't I add directly to the metadata of the
symbol".

Consistency is always good; in the ideal world all def* forms should
have a docstring. Being able to do privacy (defn vs defn-) would be nice
also.

defmethod
definterface
defstruct
deftype

Phil


Ok my bad...for a second there I thought that a defrecord expression returns a Var but it doesn't. It returns a Class object. You can't put anything on that therefore 'doc' won't work on it anyway. It is the instance of that Class that is able to take meta data. I concur that consistency is good to have. apologies for the rushed response.

Jim


--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to