I've made a small library for annotating Clojure programs with todo
statements during development. The library is inspired by the //TODO:
functionality in Eclipse and the fixme package in LaTeX.

To use the lib, simply use (or require) clj-todo, and use the todo
macro around your existing code.

(todo
 "I don't like how this function works at all. It could be O(1)."
 (defn range-sum
   [n]
   (reduce + (range n))))

todos are not limited to defn statements, but can be used in place of
a form any place in the code. To get a summary of all todos in a
project simply call todo-summary.

Summary of todos:

I don't like how this function works at all. It could be O(1).
(defn range-sum [n] (reduce + (range n)))

More examples can be found on the project github page:
http://github.com/tgk/clj-todo

If you want to play around with it, a jar has been uploaded to clojars
http://clojars.org/clj-todo

The lib seems to be working fine, but comments are very much
appriciated. There is also a lot of possible improvements that have
not yet been adressed; mostly because I don't know how to address
them. The major one is how to write a lein plugin that will make it
possible to simply use
lein todo
to get the list of todos in a project.

All feedback is very much appriciated. This was a thing I really
missed in Clojure and I want to make it as good as possible.

Thomas

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

Reply via email to