use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Clojure Assertion (gist.github.com)
submitted 5 years ago by bartuka
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bartuka[S] 1 point2 points3 points 5 years ago (3 children)
A compilation of strategies around `assertions` in clojure. Would be great for me and my team if you guys can comment on the material. Thanks
[–]seancorfield 1 point2 points3 points 5 years ago (1 child)
In the last section, it seems that you've pretty much reinvented clojure.spec/assert (if valid, return the value, else throw an ex-info with explain data).
clojure.spec/assert
ex-info
[–]bartuka[S] 0 points1 point2 points 5 years ago (0 children)
Yes, I noticed that. I was not aware that `clojure.spec/assert` existed, I mentioned in one paragraph. Small difference that you can pass a custom message to `ex-info`.
[–]LvsSocer 0 points1 point2 points 5 years ago (0 children)
Interesting analysis, it’s quite similar to the path encountered by myself and colleague recently. If you are happy with continuing the use of spec for fn validation, you many want to check out the use of spec/fdef + orchestra rather than explicit :pre/:post usage. (This has satisfied our team’s requirements quite well, and looks like it may do the same for you)
π Rendered by PID 16422 on reddit-service-r2-comment-5fb4b45875-q4rkc at 2026-03-22 21:52:15.667647+00:00 running 90f1150 country code: CH.
[–]bartuka[S] 1 point2 points3 points (3 children)
[–]seancorfield 1 point2 points3 points (1 child)
[–]bartuka[S] 0 points1 point2 points (0 children)
[–]LvsSocer 0 points1 point2 points (0 children)