Quite often I convince myself I need state or some effectful trigger, but 
further thought reveals a simpler stateless approach.

That being said--if you absolutely need to be doing something based on 
effects, something that absolutely can't be tracked via values in a purely 
functional way--like polling a queue once per second (functional-reactive 
programming notwithstanding), I personally prefer straight loop/recur to the 
list processing functions. In my mind, usings seq/filter/map suggests you 
are doing something lazy, referentially transparent, and composable. If you 
are not doing that, a loop recur signals to me you are manipulating the 
execution flow in a precise way. 

But again, I always try to find a way to avoid dealing with the messy 
stateful world until the last possible moment. Lots of application logic can 
be completely pure with one small "write to file"-type operation at the end.

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