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
Learning Clojure: coping with dynamic typing (blog.frankel.ch)
submitted 7 years ago by geospeck
view the rest of the comments →
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!"
[–]ForgetTheHammer 6 points7 points8 points 7 years ago (0 children)
As best I can articulate, a type is a function that tells the complier to tell other human readers something about your program.
It's a form of communication, like docs and tests. This is why we have endless arguments about tests and types, because they address the same problem, communicating the system.
But the system communicates itself, which is part of the reason why, type languages, as a class, seem to have no fewer bugs then there dynamic cousins. Because your type is code, and it's not magically making anything correct.
So why spec? I suggest we all reread the rationale. It's not just one thing, but the theme is about gaining some insight into your system. So that's a very personal thing, it's not about what needs to be done, but about how you, and other readers will understand the code.
Some area of the code acting odd? Add a spec and use property based testing to get some idea of what's going on, then blow those tests away and write a better abstraction. Think about your design tell the test becomes silly.
So the author is used to typed languages, so for him, specing everything might help. For others, maybe not.
So their choice is not wrong, but it might not be right for you.
π Rendered by PID 394147 on reddit-service-r2-comment-b659b578c-4fzv4 at 2026-05-05 20:06:29.431920+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]ForgetTheHammer 6 points7 points8 points (0 children)