4 ms·
One of Scala's biggest mistakes was probably to support higher rank types, because it seems to have resulted in a in a hostile takeover of the Scala community b
by PathOfEclipse 4y ago
One of Scala's biggest mistakes was probably to support higher rank types, because it seems to have resulted in a in a hostile takeover of the Scala community by pure FP zealots. No one in the world ever thought: "why don't I write Haskell code on top of a VM that really isn't well-optimized for it, using a language that wasn't designed at all for it?" But that seems to be what a large portion of the community does nowadays.
This wasn't Scala's only mistake though. It seems to have a history of implementing features that then die out due to a combination of lack of support and of never being implemented well in the first place, including:
* specialized types
* macros
* delimited continuations
* Scala reflection
* Eclipse IDE support
* Scala native (technically still going but only whenever there is funding at a university to pay a student to work on it)
* Multiple collections library rewrites (this one is pretty core!)
* other half-baked bundled libraries that have been deprecated/removed over time
Not to mention the number of community-owned frameworks that have been discontinued or declined in usage over time. Anyone remember Lift? That used to be the most popular web framework in Scala! And how are Play Framework and Akka doing nowadays?
- stusmall 4y agoIt's been years (7? 8? geez) since I've written Scala but has macro support really died out? Is this a 2 vs 3 thing? I remember loving it and saw a plenty of other community libraries leaning on it. I had some simple reflection based code I rewrote using macros for a big performance bump. The API was awkward and forced me to learn more of the magic under the covers, but in the end I was happy with it. I figured it would be too deeply ingrained and useful to just go away.
- philipkglass 4y agoThey have not gone away in Scala 3. They are better documented now and better supported. https://docs.scala-lang.org/scala3/guides/macros/macros.html https://docs.scala-lang.org/scala3/guides/macros/macros.html However, the macros changed enough that it can be a significant effort to port macro-heavy code to Scala 3 from 2.x. I see comments about this in the issue trackers of some libraries I use.
- kaba0 4y agoWell, sure Scala is a more "language research-y" PL compared to Java, but I do think that with the recent revamp of Scala 3 they did a very good job. Also, that overly zealous FP trend seems to have died down a bit, and a pragmatic FP approach is probably the most idiomatic (e.g. local mutability, but mostly immutable public APIs), which is probably the best of both worlds. I also firmly believe that Scala has hands-down the very best collections API out of any single language I have used, so there is that.