Eivind Eklund <eeklund / gmail.com> writes: >> With `quick' I don't mean `edit test file, save test file, switch to >> class file, edit class file, save test file, switch to shell, run >> tests', and an `extract parts of the test file' somewhere in between >> certainly doesn't make it quicker. > > Are you by this saying you are going to abuse Nathaniel's syntax to > group as many of your tests there as you can? Uh? No. There's no need to, I already write ordinary tests at the end of the class file and that supports a quick code-test-code cycle well, I'd only use the example syntax for tests that can serve, well, as examples. (Of course Mauricio just showed how the quick cycle can be preserved with embedded examples anyway, so whatever happens I don't have to worry about changing my coding habits. Damn you Mauricio, wasn't rpa enough to drown me in comfort and laziness?) > I don't believe the readability of assert_equal and friends will go to > the same level as an infix operator (which both you and Florian used) > with "getting used to the syntax". If it did, we'd all be programming > in Lisp (and Paul Graham wouldn't say that "prefix operators for maths > still feels weird after 20 years of programming Lisp"). Hmmm, as a little Lisper I think the matter is that prefix notation here could feel less natural with regard to the surroundings rather than in and of itself. I remember trying cl-unit with its familiar assert-equal predicates, which, ok, is prefix anyway, and then finding another framework which stated conditions like (is (= ...)) which is even *more* prefix, and I liked that one better. Anyway, mostly I don't care about prefix vs. infix, but I agree that seeing `assert_equal' and hearing it internally and making sense of it requires more brain power than reading `==' or `#=>' and instantly making sense of it, I'm just not sure that it's that relevant a quantity of brain power. Here in Rubyland we're used to try and make 0.002 go down to 0.001 whereas elsewhere people got used to live with 2^24. ;-) Massimiliano