4 ms·
I like Scala and I really recognise that terrible cleverness, but I really don't like you blaming it on the language because it's a failure of people. (Convers
by _a_a_a_ 4y ago
I like Scala and I really recognise that terrible cleverness, but I really don't like you blaming it on the language because it's a failure of people.
(Conversely, I really really wish I'd done my personal project in Scala rather than C#. It manages to be good and horrible at the same time)
- ye-olde-sysrq 4y agoI don't really believe that you can separate the language from how it's used. I blame Java when people write code that beats the crap out of the GC because Java both makes it easy (especially with streams sometimes) and also is flippant about it in most recommendations (which emphasize that the gc is good, allocating an object is cheap, and so on). Python somehow doesn't seem to have that happen nearly as often, for instance. So I also blame Scala when people over-use implicits and go functional-mad because Scala encourages it.
- kaba0 4y ago> Python somehow doesn't seem to have that happen nearly as often, for instance. It really is not a sarcastic comment, but Python is just not that fast to make GC the performance bottleneck in ordinary usage. It uses ref counting, which trades off performance to a more deterministic deallocation (plus there is also the GIL).
- PathOfEclipse 4y agoOne 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.