On Sep 3, 2008, at 4:59 PM, Chouser wrote:
> On Wed, Sep 3, 2008 at 4:36 PM, Stephen C. Gilardi
> <[EMAIL PROTECTED]> wrote:
>>
>> :refer (when you know another namespace is already present and you
>> want to
>> bring some or all of it into this namespace with filters)
>
> Is there any reason not to use :use in this case? :use is more
> robust, as it doesn't rely on your assumption that the namespace is
> indeed already present. The only namespace I'm aware of that doesn't
> behave properly with :use is 'clojure, since it's loaded from
> clojure/boot.clj instead of clojure/clojure.clj.
Good point. It seems that :use would suffice except if both of the
following are true for a particular namespace:
- it's defined outside of a lib,
- it's reasonable to want to refer to it.
I'm not aware of any uses of namespaces that meet both of those
criteria. Does anyone else know of any?
>> I like ":refer" over ":refer-clojure" because it's more general and
>> shorter.
>
> Well, it's not really shorter since you'd have to say ":refer
> clojure" instead of ":refer-clojure".
Right, it's not shorter in the call. It's only shorter in docs and
when we talk about it.
> But it is more general, and therefore requires less code to support
> more cases. If it's useful, I'm fine with it.
Some of my suggestions may be over-general when I don't have enough
experience or knowledge to see why a something very general is
unnecessary. I'd appreciate hearing more opinions on :refer vs. :refer-
clojure.
> The only other point I'll bring up is that it may be slightly less
> surprising for a missing :refer-clojure to automatically refer
> 'clojure than it would be for the more general :refer to have a
> special case for the refering of 'clojure if it's not mentioned.
That's a very good point in favor of :refer-clojure.
Thanks for the discussion.
--Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---