3 ms·
When I use lambda expressions in an OO language, I find that the smallest logical chunk of code that can be exercised by a micro-example is larger than when I u
by DanielBMarkham 9y ago
When I use lambda expressions in an OO language, I find that the smallest logical chunk of code that can be exercised by a micro-example is larger than when I use iteration or recursion for the same solution.
That's the thing I keep coming back to. FP simply allows you to do more with less code that has to be tested.
I would not consider lambda programming FP, although I sort of understand what is being said. Lambda is just the tiniest beginnings of FP.
When I started FP, I chose F#. I figured that way I could still write classes when I needed them. I also figured it would allow me to do things the "wrong" way and then learn by cleaning up.
I found over several projects that I eventually stopped using classes altogether. There just wasn't any need for them. So much of what TDD brings to the table can be boiled down to "ways to make sure you're not shooting yourself in the foot in OOP"
Sidebar: At one point, Dave (the author here) had the only TDD/Microtest framework for COBOL. It was a very cool idea. Dave's a really smart guy.