On Sep 3, 4:59 pm, Chouser <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 3, 2008 at 4:36 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote:
>
> > I have been thinking recently that "(:refer ...)" would make a good
> > supported reference argument. Instead of "(:refer-clojure ...)", I suggest
> > "(:refer ...)" which acts like any other call to refer but doesn't require
> > its arguments to be quoted. "ns" would still refer to all of clojure if
> > there is no explicit "(:refer clojure ...)" argument present.
>
> Personally, I'd rather nobody use refer for anything except the
> 'clojure namespace itself.
I agree.
> This would also be an argument against
> :use.
Did you mean to say :refer? :use seems necessary to hide refer, and
there are certainly cases where you want to load and not refer (i.e.
require).
> But my opinion seems to be in the minority, so I'll once again
> drop it until I can find a new excuse for bringing it up again. :-)
>
> > :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.
>
Right, and automatically loaded so the load semantics of requier and
use don't apply.
> > 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". But it is more general, and therefore
> requires less code to support more cases. If it's useful, I'm fine
> with it.
>
I'm not - simpler is better.
> 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.
>
Right.
> > On the subject of shorter, the name "clojure/load" is already in use, but
> > would be a better name for "load-resources" than "load-resources". I think
> > we should consider changing the name of the former to something else like
> > "load-reader" and using "load" for what is now load-resources (and :load for
> > what is now :load-resources).
>
> I have no objection to this.
>
Me neither, other than the breakage for people using load, most of
whom I presume are loading from strings to do evals, and may be
placated with a load-string.
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
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
-~----------~----~----~----~------~----~------~--~---