Hacker News new | ask | show | jobs
by zak_mc_kracken 4290 days ago
One thing where I think OOP is particularly elegant compared to FP is refinement.

Say I have a class with five methods on it. I realize I need to create a new class that has almost the same behavior: I want to reuse four of these five methods but the fifth one is different. This is a very common problem.

This is trivial to do in OOP: create a base class, override the method whose behavior you need to change, done.

I've never found an FP language that makes this as elegant.