2 ms·
I've worked with OOP a lot and I've also used FP, although less than OOP. In my experience, what you're saying is both right and wrong. It's right, because FP
by CodeMage 16y ago
I've worked with OOP a lot and I've also used FP, although less than OOP. In my experience, what you're saying is both right and wrong.
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".