Re: Use Require and Import

2014-09-21 Thread Robert Tweed
On 19/09/2014 16:46, Lee Spector wrote: On Sep 19, 2014, at 11:26 AM, John Gabriele jmg3...@gmail.com wrote: Don't use `use`. :) Since the OP is new here I'll point out that that :) is probably a nod to the fact that there's a long history of controversy on the utility/evils of use. Some

Re: Use Require and Import

2014-09-21 Thread Lee Spector
On Sep 21, 2014, at 5:11 AM, Robert Tweed fistful.of.spann...@gmail.com wrote: In short: use 'use' in the repl or any time you're generally feeling lazy. Don't use it in non-throwaway code. Use automatically refers everything in a namespace. This is handy if you don't want to type out the

Re: Use Require and Import

2014-09-21 Thread Robert Tweed
On 21/09/2014 14:31, Lee Spector wrote: I sort of agree with the bottom line here, but there are non-throwaway contexts in which (2) won't apply because you are only useing your own namespaces, and in which the overall project is small enough that the chances of conflict in (1) are acceptably

Re: Use Require and Import

2014-09-21 Thread Lee Spector
On Sep 21, 2014, at 12:31 PM, Robert Tweed fistful.of.spann...@gmail.com wrote: The whole (ns) block is just boilerplate that you ignore until you need to refer back to look something up, which is the only time it makes any difference. You can't ignore the boilerplate while you're

Re: Use Require and Import

2014-09-19 Thread Michael Klishin
 On 19 September 2014 at 10:53:32, Gomzee (gettingerr...@gmail.com) wrote: I am new to clojure can any one give me a good example answer to differentiate between Use, Require and Import. Specially I am getting confused with Require and Import. require loads and compiles Clojure namespaces.

Re: Use Require and Import

2014-09-19 Thread Hemant Gautam
Thanks for your reply let me get it more clear by taking an example. Suppose I am having 2 file a.clj and b.clj a.clj code is as follows (ns com.gettingerror.a) (defn Getting ..) (defn Error ..) b.clj code is as follows

Re: Use Require and Import

2014-09-19 Thread Michael Klishin
 On 19 September 2014 at 11:04:50, Hemant Gautam (gettingerr...@gmail.com) wrote: So, can you please tell me when I load b.clj in REPL then what happens and What difference comes between these Require and Import. You do not import functions. That's what :refer, an option on require, is

Re: Use Require and Import

2014-09-19 Thread John Gabriele
On Friday, September 19, 2014 2:53:24 AM UTC-4, Gomzee wrote: I am new to clojure can any one give me a good example answer to differentiate between Use, Require and Import. Specially I am getting confused with Require and Import. To quote Craig Andera, require is load; see

Re: Use Require and Import

2014-09-19 Thread Lee Spector
On Sep 19, 2014, at 11:26 AM, John Gabriele jmg3...@gmail.com wrote: Don't use `use`. :) Since the OP is new here I'll point out that that :) is probably a nod to the fact that there's a long history of controversy on the utility/evils of use. Some (like me) think there are programming