On 28 June 2010 22:41, cageface <milese...@gmail.com> wrote: > On Jun 28, 12:16 pm, Martin DeMello <martindeme...@gmail.com> wrote: >> It depends. I found the concepts pretty easy, since I have done a lot >> of functional programming, but when I was new to clojure I had a truly >> horrible time figuring out the various classpath issues needed to get >> things working. > > What is it about the classpath in particular that people find > difficult? Is it that different from things like PYTHONPATH or > RUBYLIB? The main differences I can see are:
For me (and to be honest, I don't have any real problem with the *concept* of the classpath, just with some of the practicalities) it's the fact that by default, Clojure doesn't work. OK, that's overstating it - the issue is that clojure.jar isn't on the *default* classpath. This is hardly surprising, of course, but it does make it harder - you encounter the classpath right at the start, before you even get Clojure running. And unless you write your own wrapper, you keep having to deal with it ("hmm, java -cp, now where did I put clojure, D:\Apps\Clojure\clojure.jar, clojure.main, oops no, this is the PC it's on the C drive. Or ..."). I know you can set the global CLASSPATH, but that feels a bit too general - what else might it affect? The simple fix to that, of course, is to supply a small wrapper script with clojure. The response "it's easy for you to write one yourself" misses the point - we're talking about the out of the box experience. If clojure.org included a "Download Clojure" link that pointed at a zipfile containing clojure.jar, clojure-contrib.jar, and a wrapper script (well, two, one for Unix, one for Windows) which set classpath based on the location of the script and ran Clojure, then people could download that, unzip it anywhere, and go. It doesn't solve all the world's problems, but it sure simplifies the initial experience! For what it's worth, here's a trivial clj.bat for Windows: @echo off setlocal set CLASSPATH=%~dp0clojure.jar;%~dp0clojure-contrib.jar;%CLASSPATH% java clojure.main %* endlocal Add as much extra complexity as you like, but that's enough for a starter. Paul. -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en