See http://kotka.de/blog/2012/06/Did_you_know_IX.html. I'd propose to use Trammel or clojure-contracts for such purpose.
https://github.com/fogus/trammel https://github.com/dnaumov/clojure-contracts вторник, 3 июля 2012 г., 17:16:15 UTC+6 пользователь skuro написал: > > Hi *, > > I'm developing a Clojure bridge to the Alfresco APIs, where I use a > protocol, Node, to extend a class coming from the original Java API > (NodeRef). Now, one of the project contributors proposed to add type hints > to the return values of the Clojure API functions, so to have, e.g.: > > (defn ^Node user-home [..] ..) > > > The sole declared purpose of it would be to document the user-home > function to return a class that fulfills the Node protocol, not caring > about reflection at all. > Now, while there's a little voice from the back of my head that tells me > it's not quite an idiomatic approach to the problem, I've not really any > strong counter argument to it. Would you consider such strategy > good/bad/great/harmful? Is it used already by any other project out there? > > Thanks, > c. > -- 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