Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Several languages on either side of the OOP vs. FP divide include both solutions to the problem -- for example, open subtyping vs. sealed case classes in Scala, and traits vs. sum types in Rust. There's more to both OOP and FP than the expression problem.


That's my point. There are people who claim "my-current-shiny is the only way". Yes, OOP and FP languages have different solutions to the problem, because it's a real problem. You need to have both OO and Functional features in your language. "OOP vs FP" is a false dichotomy.


I agree, but my point was slightly different. There are legimate points to be made -- if not agreed with -- concerning the benefits of immutability, of single-ownership patterns, of equational reasoning, etc. which are central to the modern FP ethos.

You can make OOP and FP appear equally useful by framing the discussion with the expression problem, but I think that framing is myopic, and flattens a lot of the actually interesting distinctions and philosophical differences between the two.


Indeed, in fact most successful mainstream languages including both paradigms, they just differ on the default approach (FP first vs OOP first).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: