The one issue with the lack of def- is the existence of defn-. If defn- didn't exist, no one would ask for def-. I believe this is where the "regret" comes from. The other issue with the lack of def- is that its annoying to type ^:prviate. I don't see how you could accidentally mistype it (never happened IME) or the need for compiler aid. If beginners think that there is a magic postfix syntax, I don't see how this is a problem. They are beginners and naturally there will be many things that fail their intuition. Compiler auto injection on postfix magic I'm strongly opposed to.
@Alex thanks for your long reply yesterday and the statistics! I'll get back to that. On Wednesday, February 28, 2018 at 8:06:51 PM UTC+1, Didier wrote: > > I think the issue is not with the lack of def-, but with the use of > metadata for private, as well as the presence of defn-. > > Becauae defn- exists, most newcomers think that postfix - on var defining > special forms, macros and fns is how you mark things as private. > > But its not, defn- is a syntactic hack. > > The compiler and runtime looks for the private metadata on the Var for > that. But metadata is easy to typo and always confusing as to where it > needs to be inserted. > > Not sure there's a solution. Maybe reserved meta could be turned into a > different syntax of reserved keywords which the compiler could validate if > its misplaced or mistyped? Or postfix - on any first symbol in a form could > be special syntax where the compiler auto-injects the private meta on the > returned Var. > > -- 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.