On Thu, Dec 10, 2009 at 09:26:07AM -0500, Graham Fawcett wrote:
>(let [x 1
> _ (f x)
> y (+ x 2)
> _ (g y)]
> ...)
What do people in general think of this style? I remember using this
trick a lot with O'Caml, and I've certainly used it a few times in
Clojure, but something feels icky about it.
Where it's most useful, though is with stuff like this:
(let [x ...
y ...
_ (prn "y is" y)
...]
...)
I have found I sometimes find something like:
(let [x ...
x (... x ...)
x (... x ...)
x (... x ...)]
x)
easier to write, even if it is just how I write it the first time, and
then later change it to something looking more like function
application. Sometimes, I've found the let-chain is easier to modify
in the future.
I guess, realizing it's still not imperative (necessarily), it
shouldn't bother me as much.
David
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en