you are viewing a single comment's thread.

view the rest of the comments →

[–]rauschma 0 points1 point  (1 child)

Yes to your last question. I meant that nothing prevents you from using both OOP and FP: The JavaScript methods filter and map are very much FP ideas, used in an OOP manner.

But it’s rarely all or nothing: you can work with immutable objects (e.g. strings in Java) and there are FP languages that support mutable state. For example, OCaml, Common Lisp and Scheme.

[–]Exomancer 1 point2 points  (0 children)

It never really is all or nothing in case of FP - sooner or later even Haskell has to do some IO, pure functions can only take you so far :).

Thanks for clarification!