On Mar 3, 2016 12:34 PM, "Jeremy Vuillermet" <jeremy.vuiller...@gmail.com>
wrote:
>
> Hello,
>
> Every time I go to a code base I don't know, I discover new functions
from clojure api that I was not aware of.
> Those are usually simple shortcut functions that don't do much but make
the code shorter.
>
> Just doing a research on this group for "shorter code" and "better code"
there are some cases like that.
> For example (first (first mycoll)) can be shortened with (ffirst mycoll).
There are so many place, as a relatively new clojure programmer, where I
could shorten code like that.
>
> So my question is : Do we have a tool where we can copy/paste some code
or link github repo to find those opportunities for improvement.
>
> If no, would it be hard to make such a tool ? Does this need regex or
dealing with the ast ?
>

Great question.  I doubt that it's feasible to automatically discover
sugar, which I think is what you're really talking about. But a "Sugar"
section for the docs could be very helpful.  Something that lists all the
stuff like ffirst.  FWIW I've been at it for several years but I still tend
to write (:foo (:bar baz)) instead of (-> baz :bar :foo), which is much
nicer.

gregg

-- 
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/d/optout.

Reply via email to