I am a physicist. I have been using Clojure full time for the last year and a half. The reasons that Rich (and most other Clojure evangelists) give for using Clojure, are all nice and good, but they point to what computer scientists think about. If you want scientists and engineers to think about switching to Clojure, you need to talk to the concerns that they have. Of course, there is some overlap.
I will note that this is a quick listing of ideas to discuss. There are surely more points to make, and better, cleaner ways of discussing them. Also, I haven't made any effort to use well thought out English sentences. Here are some reasons that I would give for using clojure: 1. Most data analysis gets done by writing little programs that do certain tasks. When writing in Fortran I more or less have to write a new program to do each task. In clojure, I might have to write a new function, but I keep finding that functions that I wrote before, will help with these new problems. Code re-use is much higher! Less time coding. 2. fewer number of parameters that need to be passed into subroutines. When writing fortran/C programs, you not only need to pass in the data, but you also need to pass in parameters that describe the data. In clojure, you usually only pass in the data. 3. (related to 2) Everything is a function, thus, as long as the inputs and outputs are the same, you can change the internals at will. This makes it super easy to try rewriting code to make it run faster. 4. Using the REPL you write fewer bugs. In an imperative language you have to make a guess as to how a whole (possibly very long) subroutine should be written before writing it and then debug. Using the REPL you start with the most basic steps of the subroutine, make sure those work, and then continue to build until you have something that works. 5. ease of changing function calls to allow for extra stuff/ functionality without breaking other stuff. An example would be best here. Suppose I had defined some function that worked for a specific purpose: (defn setzero [value] "If value is less than 1.0E-8 setzero returns zero.." (if (tolerance? value 1.0E-8) 0 value)) and later I decided that I would really like to use that same function again, but that 1.0E-8 won't work in this new case. I can change setzero so that it will work with all of my old code (without change to the old code) but I can make it work new code as well. (defn setzero "If value is less than parameter setzero returns zero. If no parameter is specified, the default value of 1.0E-8 is used." ([value] (setzero value 1.0E-8)) ([value parameter] (if (tolerance? value 1.0E-8) 0 parameter))) 6. Many types of Concurrency "without all that mucking about in" MPI, openMP and the like (Thanks to Douglas Adams.) 7. Is it a scripting language or a compiled language? Yes. Depending on what you need it for. I often use the REPL and my code to script stuff. There are also times where you want to have a real program as a JAR file, clojure can be both. 8. Every problem has been solved twice in Java. Meaning it has been solved three times in clojure. The underlying theme is that you can quickly write the code that you need to do your job, so that you can get back to doing your job. -- 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