3 ms·
If I could go back, I would’ve rephrased my original post so that it didn’t seem like it existed just to contradict the upstream posts. People were talking abo
by wild_preference 8y ago
If I could go back, I would’ve rephrased my original post so that it didn’t seem like it existed just to contradict the upstream posts.
People were talking about using runtime specs to annotate and validate the subset of information a function may care about. Which is certainly something I wish I could do in more languages, though ideally as much at compile time as possible.
Of course, runtime specs in Clojure let you make more assertions than just structure, so structural typing as seen in TypeScript, for example, certainly don’t go all the way. It just helps address what I thought was being discussed.
What is the ideal middleground? I think one possibility would be if Clojure
was statically typed to begin with yet had the syntax of spec/schema.
Though I’m not sure we’re talking about the same thing anymore.
- lvh 8y agoWe're not. But: good news: people are experimenting with verifying specs at compile time! And since specs come with quickcheck built in, you get a lot of "free" (in developer hours) "compile time" (actually: development time) verification. I appreciate that is not the same thing as a proof system :-)