3 ms·
TBH, I think that is a legitimate technical nit. Case classes end up being very useful, but they're not as principled as the ADTs that they're generally used to
by bkirwi 12y ago
TBH, I think that is a legitimate technical nit. Case classes end up being very useful, but they're not as principled as the ADTs that they're generally used to replace, and that shows up in a bunch of weird corner cases. It's one of the prices you pay for trying to cram this stuff into the JVM / OOP universe.
Speaking to your sibling comment on Haskell and Kotlin: I also happen to think that Haskell is by far the better-designed language. I think Kotlin does a nice job of cleaning up some of the warts of Java, but I don't really want a better Java -- I just want a better language. Scala is definitely less elegant than Haskell (Haskell/Scalaz-style FP is particularly gross) but there's a large class of problems for which I really do think it's the best language / ecosystem that happens to actually exist.
- jfb 12y agoI complain, but at the end of the day, I really do prefer working in the JVM with a language that can e.g. curry functions and implement at least partial type inference, given the constraints that we work under. I think it was a good choice; but I'm not likely to grab for Scala for fun.