Would it be a reasonable feature request to ask for Java classes to be implicitly converted to specs, the same as predicates? FWIW, plumatic/schema allows classes to be used as schemas.
The spec guide contains this example: (import java.util.Date) (s/valid? #(instance? Date %) (Date.)) ;; true ... and then, later, defines: (s/def ::date #(instance? Date %)) If classes were implicitly converted to specs, ::date would be unnecessary, and the first example could be simplified to: (import java.util.Date) (s/valid? Date (Date.)) ;; true I do a lot of inter-op and this seems like it would be really convenient. -- 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/d/optout.