Do you have a link to the discussion? Is this really the reasoning? 

I find it insufficient, because there aren't many defs supporting private :

def, defn, defmacro and definline if I am remembering correctly.

I am kind of tired of writing def ^:private. def- would really be nice to 
have. defmacro- as well. 

Is there a JIRA ticket about this?

On Thursday, May 7, 2015 at 4:36:44 PM UTC+2, Herwig Hochleitner wrote:
>
> 2015-05-07 16:12 GMT+02:00 Stig Brautaset <sbrau...@gmail.com 
> <javascript:>>:
>
>> Is it because the def form can also be ^:dynamic?
>>
> Hm, cognitect turned it down, because basically "if you go down this road, 
> why stop with def- ? and before you know, you've got a core namespace full 
> of def*-" 
>
>> At any rate, I did an attempt at my first macro to create a (def- ...) 
>> form, but it doesn't seem to work. Can you not attach metadata in a macro?
>>
> You can, but it works differently than in normal source. Remember, that ^ 
> attaches metadata the literal, that you annotate. so ^:private ~sym is the 
> symbol ~sym with a private metadata key. The quasiquoting, however, 
> rebuilds the form and inserts the sym parameter in place of the ~sym form. 
> So to attach the metadata to actual def'ed symbol, you need to attach it to 
> the output, the macro generates, like this: `(def ~(with-meta sym {:private 
> true}) ...)
>

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

Reply via email to