You mention one use case of the repl, but I think that's just one part
of a typical workflow.  Say you decide to write a function, you start
half way and then you realize that you need to group pairs of items in
a vector and then turn these pairs into a vector of maps.  Oh, but
what order are the arguments for map, and how does partition work
again?  Hit the repl and (doc partition), do some small experiments to
figure out how to do what you want to do, and then once you get it
working paste the code into your function.  Then once the function is
written it's nice to test it out on the repl; pass in a variety of
args, make sure it works, and move on.  For more complicated functions
that are harder to test by eye or that require more complex inputs, it
might be faster to write a unit test function, and then call that from
the repl.  I normally write the unit test directly below the function
definition during development, and then periodically I'll pull all the
tests into a separate file just to keep things tidy.

Not much of a repl tutorial, but if you try out these steps you'll get
the feel for it pretty quick.

-Jeff

On Jul 27, 7:11 pm, Josh Stratton <strattonbra...@gmail.com> wrote:
> I think one of the major advantages touted by languages like clojure
> are faster development times by adding to the program as you go via
> the REPL.
>
> I, however, have still been doing a more traditional
> write/save/execute debugging workflow without the REPL, which doesn't
> seem to get the real benefits of the REPL.  From what I understand,
> when you take full advantage of the REPL, you can quickly tweak things
> in the code like if a function breaks, you can rewrite it and start
> again.  Say for example a GUI is opened and a button press calls some
> clojure function.  If there's a bug in that, I can redefine that
> function in the REPL and just click again on the button to continue
> without losing the state of the program when I recompile.  Is this
> correct?
>
> Are there any tutorials specific to developing and debugging large
> clojure apps through the REPL?

-- 
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

Reply via email to