2009/2/13 Stephen C. Gilardi <squee...@mac.com>

>  I wonder what the rationale was for making it so namespaces need to be
>> quoted when using in-ns. They don't need to be quoted when using ns.
>> For example, I have
>>
>> (ns com.ociweb.talk (:gen-class)) in one file
>>
>> and
>>
>> (in-ns 'com.ociweb.talk) in another.
>>
>> I guess this is because it's conceivable one might want to use in-ns
>> with a variable, but that's not the case with ns.
>>
>
> That's certainly in the right ballpark. There was some discussion I saw
> recently of changing "in-ns/require/use/refer" into macros that accept
> unquoted names for the namespaces they deal with. The need for occasional
> use with evaluated symbols could be addressed by providing in-ns*, require*,
> use*, refer* as corresponding functions. I'm in favor of that change.
>
> I would also like to see ":load" take symbols (in addition to strings) as
> arguments especially now that the strings it takes no longer include a
> suffix. The usual "."->"/" and "-"->"_" translations would apply.
>
> (ns foo
>  (:load foo.bar foo.baz foo.quux))
>
> and then of course, the prefix list convenience:
>
> (ns foo
>  (:load (foo bar baz quux))
>

Yes, and the prefix list convenience would also solve Stephen's problem with
the violation of the DRY principle in this area :-)

-- 
Laurent

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