;)

t's just metadata, right? It could be anything in including
^:_____Do_Not_Use_Me___ but I guess what ClojureScript needs is a tool like
JSHint .... something that ca be configured to warn when say something
declared with ^:private is used from another namespace

Is there such a tool already?

On Mon, Mar 30, 2015 at 2:10 PM, Jamie Orchard-Hays <[email protected]>
wrote:

> I really like the idea of a var/fn being declared "pirate". :) Some typos
> are just perfect.
>
> Jamie
>
> On Mar 30, 2015, at 12:52 PM, Marc Fawzi <[email protected]> wrote:
>
> Ok if the CLJS compiler doesn't throw an error when it sees ^:private then
> I suppose that's much better than naming stuff using underscores ___xyz___
> although the latter has the advantage of being easy to spot (when used in a
> different namespace)
>
> How about warning during compilation that a variable/function that has
> been declared pirate is being used from a different namespace I don't know
> enough about Clojure yet to tell if that would be a bad idea, but just
> trying to understand what our options are or how others do it.
>
> Sent from my iPhone
>
> On Mar 30, 2015, at 8:51 AM, David Nolen <[email protected]> wrote:
>
> The various means of attaching ^:private metadata has always been for
> supporting documentation - both human & machine (i.e. autodoc) - not
> encapsulation.
>
> No there are no plans to actually encapsulate anything.
>
> David
>
> On Mon, Mar 30, 2015 at 11:37 AM, Marc Fawzi <[email protected]> wrote:
>
>> right but you couldn't do it accidentally
>>
>> On Mon, Mar 30, 2015 at 8:34 AM, Brandon Adams <[email protected]> wrote:
>>
>>> To be fair, xyz isn't *that* private. I.e. you can still get at the
>>> function via a namespaced var #'xyz and execute it if you want (#'xyz).
>>>
>>> On Mon, Mar 30, 2015 at 10:23 AM, Marc Fawzi <[email protected]>
>>> wrote:
>>>
>>>> Does the :private limitation below mean that defn- xyz and def
>>>> ^:private xyz won't make xyz inaccessible from outside the namespace? Any
>>>> reason this would be difficult to implement for cljs? just curious.
>>>>
>>>> <<
>>>> def notes
>>>> def produces ordinary JS variables
>>>> :private metadata is not yet enforced by the compiler
>>>> :const metadata in ClojureScript disallows re-def and supports case. In
>>>> Clojure :const allows re-def but value inlined at use site.
>>>> A def form evaluates to the value of the init form (instead of the var)
>>>> >>
>>>>
>>>> (source)
>>>> https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure#special-forms
>>>>
>>>>
>>>>
>>>> --
>>>> Note that posts from new members are moderated - please be patient with
>>>> your first post.
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "ClojureScript" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/clojurescript.
>>>>
>>>
>>>
>>> --
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "ClojureScript" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/clojurescript.
>>>
>>
>>
>> --
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ClojureScript" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/clojurescript.
>>
>
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>
>
>  --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to