3 ms·
The interesting thing to me about the FP vs OO discussion that your link highlights very well is that one of the major benefits of FP languages is the expressiv
by tybit 10y ago
The interesting thing to me about the FP vs OO discussion that your link highlights very well is that one of the major benefits of FP languages is the expressive type systems that, at least the oo languages I've seen completely lack.
I'm not sure why no mainstream OO language addresses this.
- slifin 10y agoI wish people would stop making this distinction between OO and FP like you can only use one or the other In imperative languages you typically have to use objects to create functors and other FP primitives If you reading this as a "OO Programmer" you can benefit your "OO" style code with some "FP" and vice versa The question I would really ask is have you stopped learning?
- wyager 10y agoIt's because OO does not have firm mathematical foundations, so it's much harder/impossible to give OO languages a consistent and powerful type system. Class heirarchies in particular are inimical to good type systems.
- matt_kantor 10y agoA notable exception is Scala's type system, which is pretty expressive. It has been formalized and proven to be sound[0]. [0]: http://scala-lang.org/blog/2016/02/03/essence-of-scala.html http://scala-lang.org/blog/2016/02/03/essence-of-scala.html