On Monday, March 11, 2013 12:03:59 PM UTC+1, Michael Klishin wrote:

>
> 2013/3/11 <edw...@kenworthy.info <javascript:>>
>
>> What I don't understand is the need for -> the only thing it seems to do 
>> is make something Lispy appear to be imperative.
>>
>> Is that it?
>>
>
> When you have longer chains of functions, the "traditional way" forces you 
> to read from
> right to left. For most people, it is more convenient to read from left to 
> right.
> If you have anonymous functions in this chain and they span multiple lines,
> it only gets worse.
>
> ->, ->> and friends make it easier to see the data flow. It has nothing to 
> do
> with imperative style of programming.
>

It also makes it much easier to format and indent code in a readable 
manner, while respecting the established norms for Lisp code indentation.

Note also that Haskell, that bastillion of pure FP, has *do* which does 
pretty much the same thing for the monadic bind operation.

-Marko
 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to