In Clojure, namespaces are different from the host's packages, in ClojureScript they are the same (insofar as they match the Google Closure approach).

Why all the attention to :use - I thought everyone agreed using it is a bad idea?

In any case, ClojureScript is a subset and right now that subset doesn't include :use. People who want it will have to explain why they think it's important. Its cost is that namespaces have to be enumerable, which poses challenges for code (re)loading and modularity for Clojure. The only benefit I see is that you can avoid a (minimum 2 character) prefix.

Rich

On Aug 5, 2011, at 9:12 PM, pmbauer wrote:

In Clojure, there is a clear distinction between using Clojure namespaces and importing interop packages.
Is it a goal then to blur that line in ClojureScript?
'use' couldn't be used analogously just for ClojureScript names as it is in Clojure?



On Friday, August 5, 2011 5:14:36 PM UTC-7, Rich Hickey wrote:On Aug 5, 2011, at 3:06 PM, David Nolen wrote:
> On Fri, Aug 5, 2011 at 2:51 PM, Fogus <mef...@gmail.com> wrote:
> The following lines looks problematic:
>
>    (ns mainpage
>        (:use lib.dom-helpers))
>
> That is, ClojureScript only supports the (ns foo (:require [a.b :as
> c])) form.  Try changing your ns declaration accordingly.
>
> The error message could be slightly better I agree.  ;-)
>
> :F
>
> Is there any particular reason / design rationale to not support use?
>

:use requires the ability to determine all the names in a namespace,
something we don't generally have in ClojureScript, especially for JS
pseudo-namespaces.

Rich




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

Reply via email to