Now that refer is part of require, I don't think the existing syntax is too
hard for new comers. The only thing I would suggest is adding the ability
to :rename to require. That is, now that :refer is in require, require can
handle anything except :rename and :exclude. I'm not concerned with
:exclude since IMO it probably does more harm than good. However, if one
wants to rename, one still has to use refer or use in the ns macro. If on
the other hand rename were added to require, we could forget about use and
refer entirely in the ns macro, which would simply things a lot for new
comers. (Of course, it would still be helpful for them to learn about use
and refer, but they could get quite far without knowing about them.) So
something like:
(:require [clojure.string :refer [reverse] :rename {join str-join}])
On Tuesday, August 6, 2013 11:06:52 AM UTC-7, Tassilo Horn wrote:
>
> Sean Corfield <[email protected] <javascript:>> writes:
>
> > Deprecating (not removing) :use from ns seems reasonable but I really
> > don't see any value in a new unified syntax - esp. since it would have
> > to support the legacy syntax for several releases alongside (and then
> > you'd have to consider whether mixed syntax should be supported -
> > ugh!).
>
> I totally agree with Sean. Maybe deprecate :use, and keep the rest as
> it is. The current syntax is really not hard, and it's very good that
> the keywords map 1-to-1 to the functions of the same name. Check the
> docs for `require`, then you know what `(:require ...)` does. The same
> goes for `use` and `import`.
>
> You don't have that match with the new proposed syntax where you have to
> ask yourself "is a vector with nested vector the syntax for `require` or
> `import` or whatnot?". And the only benefit seems to be that it's a bit
> more concise in some cases. I don't care if my ns declaration is 20 or
> only 12 lines long. It should be clear, and that's what the current
> syntax achieves.
>
> Bye,
> Tassilo
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.