On Oct 18, 12:02 pm, David Nolen <dnolen.li...@gmail.com> wrote:
> On Thu, Oct 18, 2012 at 2:55 PM, Alan Malloy <a...@malloys.org> wrote:
> > It's rare to get tired of this, because nobody does it: it's not
> > common because your interleaved statements are side-effecting only,
> > which is not encouraged in Clojure, and rarely needed. Certainly
> > sometimes it's the best way to do something, but not so often that I'd
> > become frustrated; if anything, having to write such irritating code
> > can serve as a good reminder that I shouldn't have so many
> > unrestrained side effects scattered through my logic.
>
> I think from the examples debugging via print statements was the main (and
> reasonable) use case.

Indeed, but it's easy to add those in any number of ways other than
the code the OP was originally unhappy with. For example, by adding _
bindings for side effects, or by introducing a macro like:

(defmacro ? [form]
  `(let [x# ~form]
     (printf "%s is %s" '~form x#)
     x#))

(let [a (? 1)
      b (? (+ 3 a))]
  ...)

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