- 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.