As I recall, Rich's explanation was basically that concrete types
(collections) go first and abstractions (mostly sequence) go last.
Hence (conj coll el), (cons el seq), (drop n seq),  (assoc coll ...),
etc. He also said that it was not a hard rule, so there might be
exceptions in the standard library.

There were also some back and forth about extensibility of some
functions, such as assoc being able to take multiple key value pairs
because the collection came first, which would not have been possible
if the collection was last (this has apparently been added after the
function's interface had been fixed, so it was not part of the
design).

I'd say the most important thing is that you be consistent with your
own data representations. If you are building a set of functions to
manipulate some given data abstraction, always put it in the same
place.

On 12 March 2013 18:29, Sean Corfield <seancorfi...@gmail.com> wrote:
> On Tue, Mar 12, 2013 at 10:21 AM, Neale Swinnerton <ne...@isismanor.com> 
> wrote:
>> if designing from scratch should we favour being threadable with -> or ->> ?
>
> My understanding is that the two threading macros are there to support
> two existing standard idioms in Clojure:
> * functions operating on collections tend to have the collection in
> the last argument slot (so you use ->>)
> * other functions - where the first argument is usually the cascade
> point so you use ->
>
> (I remember reading a better articulated explanation than that but
> can't find the link easily - hopefully you get the idea)
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> --
> 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.
>
>

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