> You can use Perl's map/grep pretty much anywhere, though they're not as > nice to use because the language is a mess (albeit more functional than > Python). I, too, have found myself using fewer and fewer explicit loops as > time goes on, starting with a revelation about the versatility of map while > I was still living in Perlistan. I haven't used a single loop statement yet > in Clojure, and I doubt I will ever do so except for performance reasons. > > Yes, that is true, you can use that approach everywhere in Perl, but for the exact reason you cite an explicit loop in Perl can sometimes be less awkward/ hard to read/ require less auxiliary yak-shaving, whereas in Lisps these higher order forms that abstract away the looping are consistently the natural way to do things, and the code is more declarative/clean. In Perl, the "right way" to do it seems to depend on the situation, sometimes a while loop, sometimes a foreach-style loop (though I can't remember the last time it seemed like a good idea to use a classic "for i to n"-style loop). Perl offers an obscene amount of syntax to choose from which is good for expressiveness, but I'll take ultra-simplicity, homoiconicity, no-syntax/DIY-syntax approach to expressiveness of the Lisp family of languages over that any day.
-- 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