- Not that often. When I know for certain, I add ^:private. Not like it's much more work. If I didn't know ahead of time, I would forget to add the private flag in either case. - Never. - Can't recollect such an event. - A few times. As far as I can tell, people appreciate the metadata approach since it is unique and powerful. The lack of one particular non-critical syntactic sugar is never an issue.
I won't mind having def- as much as I don't mind not having it. Pretty much the same as for defn- – Earth wouldn't stop turning if you had to type defn ^:private once in a while. And while I agree with you that it would be somewhat useful, bikeshedding only gets you so far. On Monday, February 26, 2018 at 7:17:05 PM UTC+2, Leon Grapenthin wrote: > > - How many times do you just write (def ...) instead of (def ^:private > ...) because you are not sure whether you need the definition yet, want to > save effort, and then you forget to add ^:private later? > - How many times have you implemented def- yourself into your project and > then used only half of the time because you had to require and :refer the > thing from some util namespace which is just as annoying as typing > ^:private? > - How many times do you use autocomplete on some namespace and find > internals because their dev forgot ^:private? > - How many times in a year do you have to explain to a Clojure newbie that > there is defn- but no def-? > > IME the statistic strongly supports def- - and I don't see why it would > hurt. > Having def- in clojure.core will not magically result in having defmacro- > and defmulti- and xyz-. Its a false and the only counterargument I have > seen. > > It would be very useful, though. > > On Monday, February 26, 2018 at 1:44:27 PM UTC+1, Alexander Yakushev wrote: >> >> Usually, it is better to use metadata rather than create an exponential >> explosion of names. Public/private is just one dimension, but you also have >> static/non-static, dynamic/non-dynamic, etc. Then you have functions, vars, >> macros, perhaps modified functions (like schema.core/defn). Cartesian >> product of those would be huge. >> >> defn- is an exclusion from the rule probably because it is used more >> often than others. >> >> On Monday, February 26, 2018 at 10:58:43 AM UTC+2, Promise. wrote: >>> >>> `defn-` => `defn` >>> 'def-` => `def` >>> >> -- 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/d/optout.