Michael, 

There are some pre-existing libraries that could give you a headstart in 
this work :-

tools.reader - can help you parse Clojure source - 
https://github.com/clojure/tools.reader

tools.namespace can help you parse and manage graphs of namespaces - 
https://github.com/clojure/tools.namespace

tools.analyzer can help you resolve symbols - 
https://github.com/clojure/jvm.tools.analyzer

kibit - can help you detect non-idiomatic code - 
https://github.com/jonase/kibit

Each of these is in active development but you should consider using them 
in their current state if you can.

Regards,

Malcolm





On Thursday, 18 April 2013 07:52:57 UTC+1, Mikera wrote:
>
> On Tuesday, 9 April 2013 00:05:35 UTC+8, michael holzer wrote:
>>
>>
>> And now to the part that will be hopefully of broader interest for every 
>> Clojure user: 
>> What do you expect from a refactoring library or from an IDE providing 
>> refactoring tools? 
>>
>
> There are a bunch of operations that would be very useful to support: 
> rename var, fix namespace aliases etc. all the usual stuff.
>
> But more important than the actual refactoring operations are IMHO the 
> warnings that the IDE provides. Refactoring activity often causes you to 
> break previously true assumptions (e.g. changing the arity of a function by 
> adding a new parameter, or changing the type of a parameter). Automatically 
> detecting these and providing a warning would be a huge boost to 
> productivity: Otherwise you will only detect the problem when something 
> fails at runtime / test time and you might get left with a particularly 
> nasty stack trace to debug.
>
> I wrote a bit more on this topic in an old blog post you may find 
> interesting:
>
> http://clojurefun.wordpress.com/2012/09/06/something-i-still-love-about-java/
>
> Apart from that, I think there is some interesting Clojure specific 
> refactoring you might do, e.g. warn on unidiomatic style and offer 
> conversion to a better alternative. I'm thinking of things like:
>
> (let [a (some-condition)] (if a (do .......)))
> => 
> (when-let [a (some-condition)] ......)
>
>

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