There is a big shift in mindset when switching to REPL-based development. Essentially, with the Java workflow you describe, you are thinking of launching and testing your whole application as a single unit.
What the REPL will let you do, which might not be immediately obvious depending on your background, is to test individual functions of your application, one at a time, interactively. it is true that starting a Clojure program is slow. However, there has not been a lot of pressure to make it faster because we do not need to do it too often. The REPL can be essentially just another API to interact with your program, but one that lets you change its code while the program is running so you can see your changes much more quickly. For the exact details of the workflow on Cursive, I cannot help you, but the sooner you start thinking in terms of trying out individual functions rather than always testing the whole program at once, the sooner you'll appreciate the REPL. (Please note that "always": it is of course still important to test the whole application as a single unit from times to times ;-).) On Friday, 5 December 2014, Di Xu <xudi...@gmail.com> wrote: > Maybe you just too used to programming in language that don't equipped > with REPL. > > Typical development process I have is: > > * analysis the problem, and design a few fn to solve it. Most of fn should > be functional, so you can easily test them. > * start a REPL, load that namespace, and test fns individually, if get > some errors, edit fns again, and use `:reload` in `use` or `require` to > reload ns, and test again. lein repl startup time is just painful. > * and then write some test cases for the fns you written for your > regression test. > > RUN is too heavy for clojure, REPL will accelerate your development a > **lot**. > > Thanks, > Di Xu > > 2014-12-05 17:41 GMT+08:00 Laye Zhou <laye.z...@gmail.com > <javascript:_e(%7B%7D,'cvml','laye.z...@gmail.com');>>: > >> Hi, >> >> I started learning Clojure this week and I'm a bit confused about the >> general development process in the Clojure world. >> >> When I write Java there is a main method as the entry of the program, and >> in the IntelliJ IDEA it's kind of easy to run or debug the program by just >> clicking the "Run" or "Debug". When I write Clojure code, this process of >> "editing, compiling, debuting/running" seems so different because I need to >> setup a Java application in IDEA + Cursive to start clojure.main -m >> main-namespace and there is no way to just click that "Run" button. Is it >> right I need to enable "Compile all namespaces" in the Clojure settings in >> IDEA? And since now we're equipped with REPL, I wonder what is the best way >> I can debug/run the program before I really build the project. Thank you. >> >> -- >> 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 >> <javascript:_e(%7B%7D,'cvml','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 >> <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');> >> 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 clojure+unsubscr...@googlegroups.com >> <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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 > <javascript:_e(%7B%7D,'cvml','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 > <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');> > 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 clojure+unsubscr...@googlegroups.com > <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');>. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.