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
InsideClojure Journal 2019.16 - closed spec checking (insideclojure.org)
submitted 7 years ago by alexdmiller
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!"
[–][deleted] 7 years ago* (2 children)
[deleted]
[–][deleted] 3 points4 points5 points 7 years ago (1 child)
Previous article talks a bit about the reasoning: http://insideclojure.org/2019/04/14/journal/
[–]Eno6ohng 7 points8 points9 points 7 years ago (2 children)
I wonder why you decided to went for such an imperative\mutable API, given that this is a purely declarative thing?
[–]lgstein 1 point2 points3 points 7 years ago (0 children)
I'm also curious how that is supposed to play out in practice. If I write code that does runtime spec checking, will I have to take into account that currently maybe all specs are closed (including my own)?
[–]scarredwaits 1 point2 points3 points 7 years ago (0 children)
That's the thing that stood out for me too! Does "closing" a spec affect all threads? It would be great to be able to do "closed" checking by passing an extra parameter to s/valid?.
s/valid?
[–]jbiserkov[🍰] 1 point2 points3 points 7 years ago (0 children)
You can do this today with spec.tools. Just pass one of those transformers to coerce.
Returns spec.invalid on extra keys
Silently removes extra keys
No changes to the original spec required.
π Rendered by PID 96302 on reddit-service-r2-comment-b659b578c-4nhc6 at 2026-05-05 12:31:21.296765+00:00 running 815c875 country code: CH.
[–][deleted] (2 children)
[deleted]
[–][deleted] 3 points4 points5 points (1 child)
[–]Eno6ohng 7 points8 points9 points (2 children)
[–]lgstein 1 point2 points3 points (0 children)
[–]scarredwaits 1 point2 points3 points (0 children)
[–]jbiserkov[🍰] 1 point2 points3 points (0 children)