> lein-typed <https://github.com/frenchy64/lein-typed> 0.3.0 is also released, and supports a new coverage<https://github.com/frenchy64/lein-typed#type-coverage> command.
Awesome! > This is all part of Brandon Bloom's ideal vision of how types should be used in Clojure. Thanks for the great idea! Heh, you're welcome! Thanks for doing this & the shout out. Just wanted to elaborate a little bit on the views I shared with Ambrose and why I pushed him to do this lein plugin, and then to add the coverage command. In short, I view types as just one more tool in the verification and correctness toolbox. They have lots of other uses, such as for aiding optimization in compilers, but they can (and should!) be part of a varied suite of tests for robust applications. However, just as approaching 100% unit test coverage has diminishing returns, so does approaching 100% "type coverage". Type annotations can fit in right next to your unit and integration tests, outside of your src directory. Alternatively, you can include your type annotations inline, just like :pre and :post conditions, or validators. For modules that fit at the intersection of easily and precisely typed, core.typed can save you a lot of manual verification work! As for the lein plugin, I think that low barriers to use will encourage more people to try core.typed as a verification tool. My dream is to be able to run a single command that infers all the types in my program, with separate annotations on the public interface from the private ones. Then I can then validate and check-in the public annotations and discard the private annotations. Whenever I change the public interface or experience cascading type inference failures in private code, I'd get a test error with lein. In this world, I can get 80% of the benefits of types with only 20% of the cost. Cheers, Brandon -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
