5 points · by DanielBMarkham · 16y ago · 3 comments
It's right, because FP really is fun and it really is just the way you describe it. But it's also wrong, because you believe that OOP can't be like that. It can.
Aggressive, continuous refactoring as a coding "process" (I hate using such an overloaded, overused word) is not exclusive to FP. Nowadays, I do my best OOP coding just like that, whenever I have the luxury.
And it really is a luxury. As soon as your code is "out there", available for the rest of the team to use and rely on, your days of aggressive, continuous refactoring are numbered. Unless you want to be known as "that guy who keeps yanking the rug from under our feet all the time", you have to settle down into the boring old routine of "I know this might not be the best way to do it, but I can't touch that other thing right now". Show me a team with two or more members and I'll show you bits of code left as a "compromise".
But there are some cautionary tales, too. Here's one I submitted earlier:
I was going to include the good and bad parts of FP, but the bad parts really deserve their own posts. Lots of little "gotchas" there.