> This makes Clojure code hard to understand I'd phrase this "This makes it hard for me to understand Clojure code". Lots of us do just fine most of the time.
Try spending some time reading point-free Haskell: there are *no* local names. You can do that in Clojure, too. > Is this style of "let" common and a good practice > to follow? (I just want to know, sorry if my expression is offensive) Generally, if a local is used only once, I don't bother naming it. That means I don't have too many lets, and usually not nested ones. >> (let [x 1 >> y (+ x 2)] >> (f x) >> (g y)) > > Well, I know my example code can be rewritten like that, but I just > could not give a better one. The point was that when you're programming without side-effects, *all* your code can be written in this way, because there is no ordering dependency between `f` and `g`. You know your code is spreading its use of side-effects too thinly when your code starts looking procedural. Ordering dependencies are a code smell. > Rearranging like this reminds me of C, in which every variables must > be listed beforehand. Since all Clojurians say "lazy" is good, I would > say I prefer C++ because I can be lazy in it, I only have to declare a > variable when I actually use it. Even lazier is not using a variable at all. (Note, though, that "laziness" in Clojure means delaying evaluation, not being lazy as a programmer.) -- 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
