Hello, I'd like to announce clojure-contracts<https://github.com/dnaumov/clojure-contracts> - a library for contract programming with emphasis on good error messages. In short, it allows you to specify pre- and postconditions for an existing function, and then uses this information to improve the error messages significantly. Simple example from the readme:
user> (defn foo [x] (+ x 5)) user> (foo nil) ;=> No message. [Thrown class java.lang.NullPointerException] user> (provide-contract foo (c/=> number? number?)) user> (foo nil) ;=> Precondition failed for var #'user/foo Expecting: number? Given: nil For the more detailed description of clojure-contracts and contract programming in general, please read the tutorial<http://ubuntuone.com/4V1fhhEJnb14RGMloKIbIS> . Note that this is a development version; it's not intended for the real use yet (although, the API is unlikely to change), but rather I need your feedback on it. Source code: https://github.com/dnaumov/clojure-contracts Documentation: tutorial <http://ubuntuone.com/4V1fhhEJnb14RGMloKIbIS> Issue tracker: https://github.com/dnaumov/clojure-contracts/issues -- 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