Fork me on GitHub
#off-topic
<
2017-04-02
>
tbaldridge14:04:49

@qqq I think the appeal of Midje is that it appears to have all the bells and whistles anyone could ever need. However, when it comes to testing, often simpler is better. A testing library can be about 100 lines of code.

tbaldridge14:04:04

IMO you don't need a testing DSL, if your base language is good enough. Which Clojure is.

tbaldridge14:04:00

And like every library Midje offers a tradeoff: a DSL and new semantics for easier to read tests. I think that's the tradeoff that many new developers don't see, and so they think Midje will just make their code more understandable. But in reality it's a DSL, and the new semantics will come back to bite them in the future.

baptiste-from-paris14:04:26

@tbaldridge love your “hate" for DSLs !

tbaldridge14:04:04

I'm trying to tone that down. As I stated in my ClojureWest talk, libraries offer value in exchange for a tradeoff. A DSL is a new language and semantics, so I rank it rather high on the tradeoffs list.

tbaldridge14:04:40

Some are worth the cost of learning, like logic or query DSLs.

baptiste-from-paris14:04:27

your talk is great ! I recognized some pattern from your Youtube channel

qqq17:04:36

@tbaldridge : so what do you use then? spec? or something else?

qqq17:04:33

@tbaldridge : what do you use for testing if not midje ?

tbaldridge17:04:44

Testing, I use Clojure.test although even that could be simpler.

tbaldridge17:04:29

For testing all you really need is an assert and a way to gather and run tests.