You can also put a docstring in a ns form to give context.
I don't think you need anything done to Clojure itself. Or more
specifically, you need not be limited by whatever Clojure has done with
docstrings. Nor will you need to modify defn. You can attach any metadata
you like, to the vars i
I think I have about two cases where multiple arity doc-strings would useful
and for that I could just go without, but defmethods are more of a problem for
me. I find defmethods can have greater contextual differences to the point I
have been placing comments inline (;commented out lines) which
What's the point of doc strings per arity? Wouldn't (doc fn) just
concatenate them all back into one anyways? Or would you extend it to take
an arity argument?
I think it seems to make sense to add them like that, but usability wise,
when would you be looking at the doc of a single arity by its
Way back when - when Rich was fielding suggestions for how to do doc
strings - I made the offhand comment that every arity could have it's own
doc string.
He didn't like the idea back then. Doubtful he will now. I'm glad he went
the route he did.
I believe the discussion took place on this mail l
Hello.
> Should any breaking changes occur in Clojure core,
Why should they?
Regards,
Mikhail.
--
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 modera
Thanks for the suggestion(s), but I don't like the idea of writing custom code
to implement better doc strings. Should any breaking changes occur in Clojure
core, then I too could be forced to make changes and deal with broken code
everywhere. If there was more community interest and the Clojure
I'm curious if it would be enough to write a macro that replaces defn in
your code? The macro would secretly generate a different function for every
arity, and therefore it could have a different doc-string for every arity,
but it wouldn't have to appear that way in your code. Is that enough, or
Hi Tim,
You suggested a great reason yourself: "peoples approach to doc strings are
as varied as people are". To the extent that is true, someone would need to
propose a design considerate of that variety of needs (and tradeoffs!).
Without such planning, Clojure would evolve as a semi-random-walk
I expected a code smell response, but I simply don't agree with that. I believe
peoples approach to doc strings are as varied as people are. I tend to be
specific and want to add more context (do not read 'more content') in my doc
string(s) than others might, but at the same time it's not like t
That actually sounds like a kind of code smell to me. If your different
arities/defmethods are doing such disparate things that you can't easily
describe them in a single docstring, it's worth asking whether they need to
be separate functions.
On Sun, Nov 5, 2017 at 7:59 AM, Tim wrote:
> I'm see
10 matches
Mail list logo