This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-13
Channels
- # beginners (43)
- # boot (318)
- # cider (1)
- # cljs-dev (6)
- # clojure (30)
- # clojure-brasil (2)
- # clojure-korea (2)
- # clojure-russia (31)
- # clojure-spec (13)
- # clojure-uk (7)
- # clojurebridge (1)
- # clojurescript (17)
- # code-reviews (1)
- # cursive (2)
- # data-science (1)
- # datascript (10)
- # hoplon (116)
- # javascript (2)
- # juxt (1)
- # mount (2)
- # onyx (12)
- # parinfer (2)
- # pedestal (1)
- # protorepl (1)
- # re-frame (3)
- # ring (1)
- # untangled (1)
what do I need to do to get fdef
to throw errors on invalid return values?
(defn x [] "hello")
(s/fdef x :ret number?)
=> (x)
"hello"
Will instrumenting a multimethod be supported? https://groups.google.com/forum/#!topic/clojure/BBWc3c40RDI
Also, is there a way to require a bunch of same-namespaced keys without specifying the namespace on each one?
Is there a best practice for conformers, like one that can transform a string to java.util.UUID - should I call it ::uuid, ->uuid etc?
@wei not supported. ret and fn specs are checking that a function works, which is seen as a testing time activity supported only by stest/check
@yonatanel: re multimethods, certainly no opposition to it, but needs some work
@yonatanel: re ns keys, use create-ns to create the namespace, then alias to alias it. There is a pending patch to remove the first step.
Re conformers, no convention
@alexmiller what would you recommend for checking inputs at runtime using spec? s/valid?
inside of a :pre
?
@yonatanel There's a version of alias in https://github.com/gfredericks/schpec that creates the namespace, then aliases to it.
Check-asserts can be turned on and off or even compiled out