clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
vemv 2019-12-17T16:24:44.026500Z

> Hopefully spec2 will make this obsolete I also hope the current alternative landscape goes mostly obsolete - obviously not good to have N competing solutions, or syntaxes. If browsing a given general-purpose library (e.g. a file unzipper, whatever), casual readers shouldn't struggle to understand its defns. It goes in the opposite direction of having a common language that we all speak :) There are some interesting ideas around though, like ghostwheel's. https://github.com/nedap/speced.def which I authored is quite minimalistic, in that regard. Although it has advanced features like spec -> type hint inference, which at this point would be painful to stop benefiting from (at work we have essentially zero reflection warnings, other than those coming from external libs. Our lib makes this easy and meaningful)

zane 2019-12-17T18:44:13.026900Z

> obviously not good to have N competing solutions Rich said something interesting about this a few months ago: https://www.reddit.com/r/Clojure/comments/crnq9f/joy_clark_interviews_rich_hickey_problem_solving/ex7fitv/

vemv 2019-12-17T19:01:08.027300Z

The money quote being, I presume: > I'm not gonna go code up this big thing, because you know, some of the things that you're talking about as being standard, they also have a bunch of known shortcomings Fully agreed. I don't look forward to a big solution that solves everyone's problems But I do advocate small-yet-full solutions that actually solve one specific problem. Else the landscape you have is a Lisp Curse http://www.winestockwebdesign.com/Essays/Lisp_Curse.html . There's actually a pretty strong analogy between Common Lispers doing OOP and Clojurists wrapping spec :)

1