3 ms·
I'm disappointed that spec didn't get beyond alpha for this release. This worries me a little just because in the past a lot of stuff in Clojure releases has fe
by thom 9y ago
I'm disappointed that spec didn't get beyond alpha for this release. This worries me a little just because in the past a lot of stuff in Clojure releases has felt abandoned after a while - transducers were new in 1.8, but couldn't use the parallelism of 1.7's reducers (do we use them still?!) because of the way stateful transducers worked. I don't see this having been worked upon for this release.
As it is, spec is pretty slow, and the implementation is a massive black box, with a ton of `(case op...)` on the inside making it almost impossible to extend in any sensible way for the moment. Beyond that I'm still really not clear on what the workflow with spec is supposed to be. I just don't verify code in the repl and then move on with my life, and there's no clear guidance on what a productive developer workflow for this stuff is. It doesn't help when every example of generative testing I see online omits the bit where you actually check a function does what it's supposed to.
Anyway, love Clojure still, but in a way it feels like an ongoing dialogue that's over my head, rather than a programming language.
- billburcham 9y ago> do we use (reducers) still?! Yes, for the reason you cite: parallelism. See Alex Miller's recent comment here: https://clojureverse.org/t/reducers-what-are-they-for/1054/3 https://clojureverse.org/t/reducers-what-are-they-for/1054/3 > it feels like an ongoing dialogue that's over my head There's always Haskell: https://www.youtube.com/watch?v=6GNDzrgFhGM&t=23m34s https://www.youtube.com/watch?v=6GNDzrgFhGM&t=23m34s
- puredanger 9y agoThere have been things that were alpha parts of Clojure for years in the past. They were eventually finalized or in a few cases deprecated. Given that few people try alpha software, it's better to release and let people use it while the work is finished. I have no doubts that spec will finish and leave alpha. spec is one of the fastest libraries available for validation (http://muhuk.github.io/validation-benchmark/ http://muhuk.github.io/validation-benchmark/). spec is not designed for extension by making new kinds of spec. It's designed to utilize any predicate function on the bottom and by combination from the pieces available. By analogy, is LEGO bad because it's hard to make your own bricks? That's just not how you use it. There are some known problems that make generation slow (mostly having things that grow too quickly in combination). One known problem was fixed in the late stages before release and we will continue to work on the sizing issues. There is more to the generative testing story that has not yet surfaced. We've got another whole project related to this that is still a work in progress. Even without that, I think there is a lot of value to be had in spec right now.