Skip to content
HHackerTube.videoSurprise me

"Agility & Robustness: Clojure spec" by Stuart Halloway

"Agility & Robustness: Clojure spec" by Stuart Halloway on HackerTube: recommended by 2 Hacker News commenters across 2 separate months, 2016–2022.

Strange Loop Conference

talk · intermediate · dated

Open on YouTube

Stuart Halloway shows how Clojure's spec library lets you build programs that are both agile and robust. He covers declarative, predicate-based specification layered on interactive REPL development.

Why Hacker News recommends it

Cited as an argument for runtime specs as an alternative to static typing, including a comparison of types, tests and spec.

people recommended it
2
separate months
2
strong recommendations
0
discussed on HN
2016–2022
“He offers a chart that shows the strengths and weaknesses of strict typing versus unit tests versus the run-time checks offered by Spec. It's worth a look.”
— susan_hall, Nov 2016, in “The Unsound Playground: Java and Scala's Type Systems are Unsound”

What HN commenters said

3 Hacker News comments link this video. Each one links back to its thread.

JonovonoMar 2022Recommends

..... you realise clojure has one of the most powerful ways to 'type' your language? Like 100x more powerful than the typescript or whatever type language you are using now ;p ▶ this video

in “Clojure 1.11 is now available” · View on HN

susan_hallNov 2016Recommends

There have been some fantastic conversations on Hacker News about type systems. I've learned a lot about the different arguments for dynamic typing, versus strict typing, versus gradual typing. Java's type system may or may not have represented new thinking when it was under development in the early 1990s, but it certainly seems a bit dated in the year 2016. The limits of the Java type system have been discussed both here on HackerNews and also elsewhere, many times. For those who want to consider arguments against Java's style of strict typing, 2 things I would recommend include "Agility & Robustness: Clojure spec, by Stuart Halloway": ▶ this video He offers a chart that shows the strengths and weaknesses of strict typing versus unit tests versus the run-time checks offered by Spec. It's worth a look. The discussions around gradual typing have been interesting, but to see how far the limits of this can be pushed, I would suggest everyone check out the Qi/Shen programming language: [link] "Qi makes use of the logical notation of sequent calculus to define types. This type notation, under Qi’s interpretation, is actually a Turing complete language in its own right. This notation allows Qi to assign extensible type systems to Common Lisp libraries and is thought of as an extremely powerful feature of the language." This next quote is from someone who has spent a long time experimenting with different Lisps: "Qi (and its successor Shen) really push the limits of what we might call a

in “The Unsound Playground: Java and Scala's Type Systems are Unsound” · View on HN

lkrubnerJan 2017Cites it

Since they cite me (and my essay from 2014) as part of their decision making process, I want to throw in 2 cents here. They ended up deciding on Go, whereas I have ended up preferring Clojure, yet I agree with a lot of what they say, so I'll try to clarify why I ended up with a different decision than what they made. I understand what they mean when they write: I think the first time I appreciated the positive aspects of having a strong type system was with Scala. Personally, coming from a myriad of PHP silent errors and whimsical behavior, it felt quite empowering to have the confidence that, supported by type-checking and a few well-thought-out tests, my code was doing what it was meant to. There are times when I appreciate the strict type-checking that happens in Java. I do get what they mean. But there are also a lot of times when I hate strict type-checking (in particular, when dealing with anything outside of the control of my code, such as whimsical, changing 3rd party APIs that I have to consume (for some business reason), or even 1st party APIs that feel like 3rd party APIs because they are developed by another team (within the same company) or for some reason we can not fix the broken aspects of some old API that was developed in-house 6 years ago.) Because of this, I have become a proponent of gradual typing. If I am facing a problem that I have never faced before, I like to start off without any types in my code, and then, as I understand the problem more, I like

in “Making the move from Scala to Go” · View on HN

Topics & tags

Functional programmingSoftware architecture & designclojurespecfunctional programmingstatic vs dynamic typingvalidation