How does OO factor into "modularity and extensibility" that FP can't do? Functions compose far simpler than interfaces/class inheritance The type system doesn't help when most people do not write total functions and doing so is not enforced.
-
-
Replying to @JM0x5C
Object generalizes function: multiple "input" (required) / "output" (provided) members, recursion through `this`. Subtyping simpler than existentials (e.g., heterogenous list). Don't ask "can it do it", but "can it do it as naturally"? Why not play to strengths of both paradigms?
1 reply 0 retweets 10 likes -
Replying to @adriaanm
Because in my extremely biased opinion, there is no strength to object orientation whatsoever that isn't solved via well supported function composition + typeclasses + algebraic data types. I do not find a benefit in mixing the two whatsoever.
3 replies 0 retweets 17 likes -
And before a "just go to eta or haskell" argument pops up, the former is extremely young, and the latter has far less job openings.
1 reply 0 retweets 2 likes -
Replying to @JM0x5C
Then my advice is to "contribute to eta and help it grow" or "create more Haskell jobs". Both are easier than turning Scala into a Haskell. I hope we are clear on that.
2 replies 4 retweets 41 likes -
so, you have to be a little object-oriented to write Scala?
1 reply 0 retweets 1 like -
Isn’t it a consequence of being on the JVM? More exactly, being on the JVM and using libraries w/o a foreign function interface.
1 reply 0 retweets 0 likes -
not at all. have been doing pure FP in Scala for years. Only OOness used was sealed trait inheritance, abstracting an algebra of operations that may then be implemented with an ‘FFI’ into library (if necessary)
1 reply 0 retweets 4 likes -
Over the years I’ve suspected you might be doing FP :-) My point is that scala does not need an FFI to java. Another Lang with no concept of inheritance would at least have an impedance mismatch if not a full on FFI. No big deal.
0 replies 0 retweets 2 likes -
This Tweet is unavailable.
Farking nailed it m8.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.