Re: Can we please deprecate the :use directive ?

2013-08-06 Thread Phillip Lord
Struggling a bit. Moving the keywords to the end of the vector rather than the beginning? This reduces complexity? Phil Greg g...@kinostudios.com writes: Looking at it again, we don't even need an explicit :require anymore: (ns one.fresh-server optional doc string goes here

Re: Can we please deprecate the :use directive ?

2013-08-06 Thread Greg
Struggling a bit. Moving the keywords to the end of the vector rather than the beginning? This reduces complexity? I changed the syntax a bit since posting that, please have a look at the [Proposal] Simplified 'ns' declaration thread. - Greg -- Please do not email me anything that you are

Re: Can we please deprecate the :use directive (was Re: [Proposal] Simplified 'ns' declaration)

2013-08-06 Thread Lee Spector
On Aug 6, 2013, at 7:55 AM, Curtis Summers wrote: I agree that wildcards make it easy (in the nearness sense), but from a long-term maintainability standpoint, I'd prefer to have explicit imports as is. When I'm reading your code a year from now and need to look-up the docs on a class,

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Korny Sietsma
Agree that :use should be deprecated, mostly as it's quite a barrier to folks new to the language that you need to know 3 different parts of the ns macro before you start. However objectively bad is strong language indeed. :refer :all is vital anywhere you want a DSL - if using something like

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Steven Degutis
The only time I've seen :as lead to ugly code was when it was in a DSL that would probably have been nicer to use if it was a data-based DSL like Hiccup rather than code-based. On Mon, Aug 5, 2013 at 3:40 AM, Korny Sietsma ko...@sietsma.com wrote: Agree that :use should be deprecated, mostly

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Phillip Lord
Anthony Grimes disciplera...@gmail.com writes: I can't think of a single good reason to not deprecate :use. :require can do everything :use could do now. Wait for it, wait for it This isn't about whether or not (:use ..) without :only is bad. I'd go as far as to say that outside of

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Mikera
On Monday, 5 August 2013 09:40:04 UTC+1, Korny wrote: Agree that :use should be deprecated, mostly as it's quite a barrier to folks new to the language that you need to know 3 different parts of the ns macro before you start. I really don't think :use was ever a significant problem for

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Mikera
On Monday, 5 August 2013 11:35:22 UTC+1, Phillip Lord wrote: Anthony Grimes discip...@gmail.com javascript: writes: I can't think of a single good reason to not deprecate :use. :require can do everything :use could do now. Wait for it, wait for it This isn't about whether or

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Mikera
On Monday, 5 August 2013 09:50:34 UTC+1, Steven Degutis wrote: The only time I've seen :as lead to ugly code was when it was in a DSL that would probably have been nicer to use if it was a data-based DSL like Hiccup rather than code-based. It's pretty ugly to use aliases for numerical

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Stefan Kamphausen
On Monday, August 5, 2013 2:13:02 PM UTC+2, Mikera wrote: To me the things that make Clojure namespace handling a nightmare for beginners are: - Bad error messages (no.1 problem!) - Confusion with keywords vs. symbols (why :use in ns declarations vs use at the repl?) - Confusion about

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Greg
It's pretty ugly to use aliases for numerical code, e.g. with core.matrix, e.g. Agreed. It's nice that :require :refer :all is available for such instances, isn't it? -Greg -- Please do not email me anything that you are not comfortable also sharing with the NSA. On Aug 5, 2013, at 8:22

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Greg
It's pretty ugly to use aliases for numerical code, e.g. with core.matrix, e.g. Agreed. It's nice that :require :refer :all is available for such instances, isn't it? * Or for the more gentlemanly and considerate among us, just (:require ... :refer [+ - / *]). -Greg -- Please do not

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Phillip Lord
Greg g...@kinostudios.com writes: It's pretty ugly to use aliases for numerical code, e.g. with core.matrix, e.g. Agreed. It's nice that :require :refer :all is available for such instances, isn't it? Which leads to the crux of the question. Given that the functionality is there, and that

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Greg
This email contains a proposal for a way to get rid of at-least the following forms from the (ns) declaration: - :refer-clojure - :use - :import See below... The namespace declaration is too complex. The existence of :use is not what causes this. I agree that it is not the *sole* cause,

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Greg
* That email was just an idea to explore, not perfection. Also, this is a mistake: (:require [clojure.core :refer [ancestors printf]] Should read something like: (:require [clojure.core :refer-except [ancestors printf]] - Greg -- Please do not email me anything that you are not comfortable

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Greg
Looking at it again, we don't even need an explicit :require anymore: (ns one.fresh-server optional doc string goes here [clojure.core :refer-except [ancestors printf]] [core.matrix :refer :all] [ring.adapter.jetty :refer [run-jetty]] [ring.middleware.file :refer [wrap-file]]

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Lee Spector
On Aug 5, 2013, at 4:40 AM, Korny Sietsma wrote: 3. Use :refer :all. It's perfectly fine, IMHO, when used responsibly. I agree in principle, but as I mentioned earlier in a related thread, when I actually tried to convert my :use instances to :require :refer :all I learned (I think!) that

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Lee Spector
On Aug 5, 2013, at 8:15 AM, Mikera wrote: On Monday, 5 August 2013 11:35:22 UTC+1, Phillip Lord wrote: Anthony Grimes discip...@gmail.com writes: I can't think of a single good reason to not deprecate :use. :require can do everything :use could do now. Wait for it, wait for it

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Softaddicts
I agree on this, just started to replace some :use by refer all and I have to maintain the convention to place these at the end of the :require list otherwise they get obfuscated if they end up in the middle. There are only one or two per name space and we can have six to a dozen required name

Re: Can we please deprecate the :use directive ?

2013-08-04 Thread Anthony Grimes
I can't think of a single good reason to not deprecate :use. :require can do everything :use could do now. This isn't about whether or not (:use ..) without :only is bad. I'd go as far as to say that outside of test files (and sometimes not even those) and repl sessions, :use without :only is

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Ye He
Yesterday, I spent hours trying to figure out why some code didn't work. The code is like so: (defn replace-symbol-in-ast-node [old new ast] (tree-replace (symbol old) (symbol new) ast)) I use tree-replace directly like this: (ast/tree-replace (symbol 'a) (symbol 'c) (ast/sexp-parsley '(+ a

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Takahiro Hozumi
Hi Ye, or at least *Do Not Use *those standard names*.* The following guide suggests the opposite. http://dev.clojure.org/display/community/Library+Coding+Standards Use good names, and don't be afraid to collide with names in other namespaces. That's what the flexible namespace support is

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Softaddicts
You did not get a warning that symbol was overriding the core symbol fn ? Luc P. Yesterday, I spent hours trying to figure out why some code didn't work. The code is like so: (defn replace-symbol-in-ast-node [old new ast] (tree-replace (symbol old) (symbol new) ast)) I use

Re: Can we please deprecate the :use directive ?

2013-08-03 Thread Ye He
What I mean is don't use it when you use :use. Regards, Ye He On Sun, Aug 4, 2013 at 12:52 PM, Takahiro Hozumi fat...@googlemail.com wrote: Hi Ye, or at least *Do Not Use *those standard names*.* The following guide suggests the opposite.

Re: Can we please deprecate the :use directive ?

2013-07-27 Thread Colin Fleming
From another point of view, as a tool developer if you want to accurately parse ns declarations it's extremely difficult. :use is a beast, and the number of options you can potentially combine are crazy. This is mostly due to the fact that :use combines what most people think of as :use and also

Re: Can we please deprecate the :use directive ?

2013-07-26 Thread Max Gonzih
Totally agree. :use is anti-pattern since :require :refer :all can do the same. If you have :use in ns macro and want to make :refer :all visible just put it at the end of ns macro, separated b empty line from other :require clauses. Having 2 ways of doing so simple thing as requiring code is

Re: Can we please deprecate the :use directive ?

2013-07-26 Thread Phillip Lord
It's different, because it doesn't necessarily eval with the ns form. So, for example, nrepl.el has an eval ns form command. This would not work with a use form. Gary Trakhman gary.trakh...@gmail.com writes: You could also do (use 'clojure.test) below the ns form. One thing that generally

Re: Can we please deprecate the :use directive ?

2013-07-26 Thread Phillip Lord
Laurent PETIT laurent.pe...@gmail.com writes: The same logic could suggest we remove or because we can express it with and and not. Except nobody complains about or, and or not ;-) Actually, they are a right pain when writing my library, because I wanted to use them to mean something else.

Re: Can we please deprecate the :use directive ?

2013-07-26 Thread greenh
A couple thoughts, my own 2-cents-worth. First, I think I’m seeing an entirely legitimate concern being expressed by some developers that :use complicates life in their shops. Contrariwise, there’s clearly a set of developers who are in environments where :use feels very natural, and is of

Re: Can we please deprecate the :use directive ?

2013-07-26 Thread Gary Trakhman
This post takes quite a lot of things to extremes, but I think the main argument still stands. We need good defaults, not to totally change clojure into a newbie-friendly thing at the expense of what makes clojure special. This proposed change fixes a pervasive pain point in many codebases

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Philippe Guillebert
Hi list, Just a thought, I usually limit my usage of (:use) to DSL-like functions, like for instance cascalog : (?- (stdout) [?a ?b] (generator : ?a ?b)) Without a use, or (:require :refer :all), this would become very cumbersome to read : (cascalog/?- (cascalog/stdout) [?a ?b] (generator

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Mikera
On Tuesday, 23 July 2013 21:55:12 UTC+1, Sean Corfield wrote: On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wol...@gmail.comjavascript: wrote: On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen ska...@gmail.comjavascript: wrote: It complects require and refer ;-) How so?

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Laurent PETIT
2013/7/25 Philippe Guillebert philippe.guilleb...@gmail.com: Hi list, Just a thought, I usually limit my usage of (:use) to DSL-like functions, like for instance cascalog : (?- (stdout) [?a ?b] (generator : ?a ?b)) Without a use, or (:require :refer :all), this would become very

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Mikera
On Tuesday, 23 July 2013 16:50:50 UTC+1, Greg Slepak wrote: I think I read somewhere that :use is no longer encouraged, but I could be mistaken. From what I've read, it seems like most people agree that Clojure has too many ways of including/importing/referencing/requiring/using things:

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Mikera
On Tuesday, 23 July 2013 19:17:02 UTC+1, Jozef Wagner wrote: +1, :use is IMO an antipattern. I hate it mainly in blogs, where they explain some new API. They :use like 3 namespaces and you have to guess which fn is from which ns :) Hmmm perhaps I'm guilty of this. But I find code much

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Moritz Ulrich
Philippe Guillebert writes: Hi list, Just a thought, I usually limit my usage of (:use) to DSL-like functions, like for instance cascalog : (?- (stdout) [?a ?b] (generator : ?a ?b)) Without a use, or (:require :refer :all), this would become very cumbersome to read : (cascalog/?-

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Phillip Lord
Laurent PETIT laurent.pe...@gmail.com writes: (:use foo :only [a b c]) will become (:require foo :refer [a b c]) (:use foo) will become (:require foo :refer :all) The same logic could suggest we remove or because we can express it with and and not. This will save lots of time and frustration

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Gary Trakhman
You could also do (use 'clojure.test) below the ns form. One thing that generally annoys me with 'ns' is that people feel it's some magical thing that has to be in the head of every file, like java imports, but it's really just a macro. It just goes to show that conventions are important.

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Nicola Mometto
Gary Trakhman writes: You could also do (use 'clojure.test) below the ns form. One thing that generally annoys me with 'ns' is that people feel it's some magical thing that has to be in the head of every file, like java imports, but it's really just a macro. It just goes to show that

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Steven Degutis
I think that's a good thing. I like to think of (ns) like a magical thing that has to be at the head of every file. It gives me consistency and predictability. It lets me not have to think. I almost wish it were just some magical required thing. -Steven On Thu, Jul 25, 2013 at 10:43 AM, Gary

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Laurent PETIT
2013/7/25 Phillip Lord phillip.l...@newcastle.ac.uk: Laurent PETIT laurent.pe...@gmail.com writes: (:use foo :only [a b c]) will become (:require foo :refer [a b c]) (:use foo) will become (:require foo :refer :all) The same logic could suggest we remove or because we can express it with and

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Ryan Stradling
+1 on Phil's proposal My assumption from our discussion would be that a warning would be added in a near release when :use was detected in the ns macro, and that it would be removed for Clojure 2.0 when backwards-incompatible changes are OK. Thanks Ryan On Thursday, July 25, 2013 12:07:53 PM

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Ye He
Well, obviously :use can't be replaced by (require :refer). According to DRY, I strongly agree the deprecation of :use. But that doesn't mean interpreter shouldn't support it right now since we have legacy code base. However, we could come to an agreement to less use of :use. It's trivial to

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Baishampayan Ghose
Lee, For that use-case, you can always use something like (:require the-ns :refer :all). Regards, BG On Wed, Jul 24, 2013 at 1:27 AM, Lee Spector lspec...@hampshire.edu wrote: On Jul 23, 2013, at 3:06 PM, Gary Trakhman wrote: Yea, I have a single namespace with project-specific common

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Michael Klishin
2013/7/24 Ye He htt5...@gmail.com Well, obviously :use can't be replaced by (require :refer). Are you sure? require with :refer :all does exactly what :use does as far as I know. According to DRY, I strongly agree the deprecation of :use. But that doesn't mean interpreter shouldn't support

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Ye He
Sorry, It's a typo. What I mean is it can be replaced. But you can't force people not to use :use without :only, and the tool I mentioned will replace that kind of misuses. --  Regards, Ye He On 24 July 2013 at 4:46:44 PM, Michael Klishin (michael.s.klis...@gmail.com) wrote: 2013/7/24 Ye He

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Michael Klishin
2013/7/24 Ye He htt5...@gmail.com But you can't force people not to use :use without :only, and the tool I mentioned will replace that kind of misuses. I'd start by adding a scary warning to the compiler first, and then remove support for :use in a couple of versions. -- MK

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread David Powell
I usually :use clojure.pprint and clojure.repl. Nobody was hurt. For everything else, I use :require/as. -- Dave On Tue, Jul 23, 2013 at 7:27 PM, Gary Trakhman gary.trakh...@gmail.comwrote: We should scour clojuresphere for uses of 'use' and automatically post github issues to the

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Lee Spector
On Jul 24, 2013, at 2:40 AM, Baishampayan Ghose wrote: For that use-case, you can always use something like (:require the-ns :refer :all). Thanks for the clarity BG. I guess if/when it becomes necessary I'll convert all of my (:use the-ns) to (:require the-ns :use :all), although I don't

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Phillip Lord
I use 'use' yes. Take, for instance, this code. It uses my own library to generate a series of logical statements (about pizza's -- there is a reason, daft though it sounds). https://github.com/phillord/tawny-pizza/blob/master/src/pizza/pizza.clj It isn't until around the 300th line that I

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Laurent PETIT
2013/7/24 Lee Spector lspec...@hampshire.edu: I don't really see why it's helpful to anyone to make me and other :use users do this. Lee, you were in the past really brilliant at showing me whre I couldn't see, anymore, how difficult to grasp some Counterclockwise features were. This is what

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Takahiro Hozumi
I hate it mainly in blogs, where they explain some new API. They :use like 3 namespaces and you have to guess which fn is from which ns :) Agree. Code is read much more often than it is written, so omitting a few character is not effective time-saving. I also don't like :refer :all. I think it

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Lee Spector
On Jul 24, 2013, at 9:35 AM, Laurent PETIT wrote: You (and to some extent me) can easily play with both forms. But why both forms ? That's curse of knowledge in action, because this will make no sense at all for newcomers, and there's no good reason for having both, except historical ones.

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Softaddicts
I disagree, when I use tracing fns and other useful REPL tools, I like to have them included without having to prefix them with an alias. It's not a hack it's a feature and you are free to use it or not. If code writers do not care about code readers it's a choice, maybe bad but that decision is

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Alex Baranosky
+1 for scary compiler deprecation warning for 1.6.0, then removing :use in the 1.7.0 release. On Wed, Jul 24, 2013 at 8:49 AM, Softaddicts lprefonta...@softaddicts.cawrote: I disagree, when I use tracing fns and other useful REPL tools, I like to have them included without having to prefix

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Alex Baranosky
If anyone needs help removing all their uses, Slamhound ( https://github.com/technomancy/slamhound) does a decent, though not perfect, job of automating this. On Wed, Jul 24, 2013 at 9:16 AM, Alex Baranosky alexander.barano...@gmail.com wrote: +1 for scary compiler deprecation warning for

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Steven Degutis
If our votes count for anything, then I'd like to add +1 for getting rid of :use, and strongly discouraging :refer :all. On Wed, Jul 24, 2013 at 11:16 AM, Alex Baranosky alexander.barano...@gmail.com wrote: +1 for scary compiler deprecation warning for 1.6.0, then removing :use in the 1.7.0

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread dennis zhuang
I am using ':use' for my own namespaces.I know it's discouraged, but if i can control my own code,why not? Compiler can give me warnings and i process all warnings carefully. 2013/7/25 Steven Degutis sbdegu...@gmail.com If our votes count for anything, then I'd like to add +1 for getting rid

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Phil Hagelberg
I can confirm that the point of adding :refer support to :require was to deprecate :use; I suggested this to Rich at the 2011 Conj when he mentioned the ns macro is too complicated, and he agreed it would be a good idea to enhance :require so that it would make :use unnecessary in order to

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Softaddicts
This is quite decent. Luc I can confirm that the point of adding :refer support to :require was to deprecate :use; I suggested this to Rich at the 2011 Conj when he mentioned the ns macro is too complicated, and he agreed it would be a good idea to enhance :require so that it would make

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Lee Spector
On Jul 24, 2013, at 12:45 PM, dennis zhuang wrote: I am using ':use' for my own namespaces.I know it's discouraged, but if i can control my own code,why not? Compiler can give me warnings and i process all warnings carefully. I agree. But I do now see that it's really just about as good,

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Alex Baranosky
Imo, as soon as you have to maintain other peoples' code that heavily uses naked use, require starts to look a whole lot nicer. On Wed, Jul 24, 2013 at 10:14 AM, Lee Spector lspec...@hampshire.eduwrote: On Jul 24, 2013, at 12:45 PM, dennis zhuang wrote: I am using ':use' for my own

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Softaddicts
Too much is the same as not enough. People can choose to which extend they want to hang themselves, how thick the rope they use should be and the height from which they will throw themselves to insure a fast and painless deliverance, hopefully by breaking their neck as fast as possible :)

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Cedric Greevey
On Wed, Jul 24, 2013 at 12:50 PM, Phil Hagelberg p...@hagelb.org wrote: My assumption from our discussion would be that a warning would be added in a near release when :use was detected in the ns macro, and that it would be removed for Clojure 2.0 when backwards-incompatible changes are OK.

Can we please deprecate the :use directive ?

2013-07-23 Thread Greg
I think I read somewhere that :use is no longer encouraged, but I could be mistaken. From what I've read, it seems like most people agree that Clojure has too many ways of including/importing/referencing/requiring/using things:

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Jozef Wagner
+1, :use is IMO an antipattern. I hate it mainly in blogs, where they explain some new API. They :use like 3 namespaces and you have to guess which fn is from which ns :) JW On Tuesday, July 23, 2013 5:50:50 PM UTC+2, Greg Slepak wrote: I think I read somewhere that :use is no longer

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Gary Trakhman
We should scour clojuresphere for uses of 'use' and automatically post github issues to the projects of interest, and redefine the ns macro to issue a warning with use. Does anyone actually like 'use'? Require is always more evident. On Tue, Jul 23, 2013 at 2:17 PM, Jozef Wagner

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Lee Spector
On Jul 23, 2013, at 2:27 PM, Gary Trakhman wrote: We should scour clojuresphere for uses of 'use' and automatically post github issues to the projects of interest, and redefine the ns macro to issue a warning with use. Does anyone actually like 'use'? Require is always more

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Softaddicts
We have production code using it. It's easy to say that it's a bad pattern after the fact. We have been using it in a disciplined way. It simplifies our life in the REPL we have some tools we want to see included automatically each time we switch to a name space. Anything else aside from

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Steven Degutis
For much the same reason, I've been using :require with :as and a one-or-two-letter alias, so I can do x/whatever. Generally works well. On Tue, Jul 23, 2013 at 1:38 PM, Lee Spector lspec...@hampshire.edu wrote: On Jul 23, 2013, at 2:27 PM, Gary Trakhman wrote: We should scour

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
We only have :use in a couple of legacy tests and two scratch projects. We've switched from :use to :require .. :refer :all for situations where :use used to make sense (primarily in a test ns where we want to just refer in all of the ns being tested). We have a handful of places where we :refer

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Cedric Greevey
:use...:only doesn't strike me as especially problematic, since it documents the specific symbols it's importing and from where. On Tue, Jul 23, 2013 at 3:04 PM, Sean Corfield seancorfi...@gmail.comwrote: We only have :use in a couple of legacy tests and two scratch projects. We've switched

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Gary Trakhman
Yea, I have a single namespace with project-specific common utilities which I refer to as u/some-util-function. For me, it's a bit scary to have implicit symbols in scope. A typo can make a local binding refer to something that might not exist in production, or at least not what's intended.

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Gary Trakhman
What's problematic about it is that it's slightly easier to do the wrong thing. It seems insignificant, but 98% of times you use use, it's going to be wrong. Also, 'use only' means I have to change my calling NS twice in different parts of the emacs buffer any time I change a function name in

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Shantanu Kumar
One of the main issues I have faced with :use is, understanding a non-trivial codebase becomes very difficult and almost always requires Emacs Meta-dot. I'd vote for deprecating :use. Shantanu -- -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Lee Spector
On Jul 23, 2013, at 3:06 PM, Gary Trakhman wrote: Yea, I have a single namespace with project-specific common utilities which I refer to as u/some-util-function. For me, it's a bit scary to have implicit symbols in scope. A typo can make a local binding refer to something that might not

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Cedric Greevey
On Tue, Jul 23, 2013 at 3:26 PM, Gary Trakhman gary.trakh...@gmail.comwrote: What's problematic about it is that it's slightly easier to do the wrong thing. It seems insignificant, but 98% of times you use use, it's going to be wrong. Also, 'use only' means I have to change my calling NS

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
On Tue, Jul 23, 2013 at 12:57 PM, Lee Spector lspec...@hampshire.edu wrote: I'm sure I'm coming from a minority perspective on this, but for the kind of work I do it's often more important to be able to quickly sketch out and test ideas, without any ceremony about which functions come from

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Softaddicts
None of what has been said so far makes me believe that our usage of use is bad. It's like a rope, you can use it for useful purposes or you can hang yourself. You use it at your own taste and will. Lack of discipline does not constitute for me a reason to trash a feature as scarce as his

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Gary Trakhman
I think what we're proposing is not about removing the capability to do 'use'. That will remain, it's clojure after all. You could also implement it yourself easily enough. The issue is whether it's worthwhile to have it as a core function, without some kind of notice that better things exist.

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Stefan Kamphausen
On Tuesday, July 23, 2013 9:42:39 PM UTC+2, Shantanu Kumar wrote: One of the main issues I have faced with :use is, understanding a non-trivial codebase becomes very difficult and almost always requires Emacs Meta-dot. which is particularly annoying when you read code on a blog (as

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Ben Wolfson
On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen ska2...@gmail.comwrote: It complects require and refer ;-) How so? -- Ben Wolfson Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wolf...@gmail.com wrote: On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen ska2...@gmail.com wrote: It complects require and refer ;-) How so? Because use = require + refer (essentially). -- Sean A Corfield -- (904) 302-SEAN An Architect's View --

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Lee Spector
On Jul 23, 2013, at 4:43 PM, Gary Trakhman wrote: For instance, we have defrecords now, no one's going to reach for defstruct because records are documented and promoted more thoroughly. FWIW I'm even a contrarian on defstruct :-! although I've switched to records anyway on account of

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Laurent PETIT
It's not as if *some* (cough cough) parts of Clojure were'nt opinionated, right? :-) Having in the (ns) macro the possibility to use :use, to use :require, to use :refer-clojure, to use :require-macros can be daunting, and not only for newcomers! And not to mention that the vast majority of the

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Ben Wolfson
On Tue, Jul 23, 2013 at 1:55 PM, Sean Corfield seancorfi...@gmail.comwrote: On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wolf...@gmail.com wrote: On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen ska2...@gmail.com wrote: It complects require and refer ;-) How so? Because use = require

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Softaddicts
Maybe we need an simpler alternative to the ns macro without all these complex options :) With a short name like ns-stop-banging-your-head-on-the-wall :) Or the reverse, ns-make-your-life-more-chaotic... :) Luc P. It's not as if *some* (cough cough) parts of Clojure were'nt opinionated,

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Laurent PETIT
2013/7/23 Softaddicts lprefonta...@softaddicts.ca: Maybe we need an simpler alternative to the ns macro without all these complex options :) With a short name like ns-stop-banging-your-head-on-the-wall :) would violate the rule use often = short name ;-) Or the reverse,

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Stefan Kamphausen
On Tuesday, July 23, 2013 11:13:11 PM UTC+2, Ben wrote: On Tue, Jul 23, 2013 at 1:55 PM, Sean Corfield seanco...@gmail.comjavascript: wrote: On Tue, Jul 23, 2013 at 1:53 PM, Ben Wolfson wol...@gmail.comjavascript: wrote: On Tue, Jul 23, 2013 at 1:50 PM, Stefan Kamphausen

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Sean Corfield
On Tue, Jul 23, 2013 at 2:13 PM, Ben Wolfson wolf...@gmail.com wrote: If that's all that's required for one thing to complect two others, clojure's rife with the stuff. if-let complects if and let. Destructuring assignment complects assignment and getting values from a data structure (as the

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread John Gabriele
On Tuesday, July 23, 2013 11:50:50 AM UTC-4, Greg Slepak wrote: I think I read somewhere that :use is no longer encouraged, but I could be mistaken. From what I've read, it seems like most people agree that Clojure has too many ways of including/importing/referencing/requiring/using