top | item 45635840

(no title)

cryptos | 4 months ago

This story reminds of Scala. The language as such is also fine, but has (had?) a cultural problem. There functional programming fundamentalists always promoting the purest solution without solid reasoning - as if god had decided that only pure functional programming is your ticket to paradise. In addition, Scala comes also with powerful language features to build abstractions, like traits, generics, and almost arbitrary names for classes, objects, and functions. All that lead to a culture of unreadably "try to be clever" code. I'm not sure whether the Scala authors paved the way with methods like :\ (fold left) or whether that happened, because the language had the features, but I tend to assume the latter. It is a great responsiblity of a language designer to think about what others might do with the language later. Regarding language features the rule "when in doubt, leave it out" applies. See Go (although not my favorite language).

discuss

order

AlterEgo7|4 months ago

This seems to be an antiquated view on Scala and the people working on it and it's tooling. Referring to :\ as foldLeft suggests the parent hasn't seen Scala code since 2018 and scalaz which is nowhere to be found nowadays. I've been working professionally with Scala since 2019 and have never come across the symbol soup that was scalaz.

Programming language choice is a matter of taste to a large degree so it's possible the different people value different traits of languages.

"When in doubt leave it out", is a design decision that can be taken to extremes in some cases and many of us feel crippled and don't enjoy such languages. There can be languages that provide powerful abstractions and rely on its users' trust to use them appropriately. Of coyrde, like every tool it can be misused but that should not be the baseline we use for comparison. Because surely we can find dreadful code in every language.

As a closing paragraph I'll just say that Scala 3 is very nicely designed language that simplifies a lot of the sticky point with Scala 2 and allows for a nice blend of OOP and functional programming. Functional programming in Scala is opt-in and progressive and is a good choice for greenfield projects on the JVM. Also a final note, tooling for Scala and Scala 3 specifically has improved a lot to the point where it just works without arcane invitations of the past. Overly confident opinions to the contrary for people who haven't touched the language since 2018, scala 2.11 and sbt 0.13 are quite out of touch.

pjmlp|4 months ago

Given that Zio and Effects are all the rage of topics in what is left of Scala userbase, I would say the opionion is not wrong.

Metals and InteliJ still have issues with Scala 3, and Eclipse plugin is stuck in Scala 2.

pjmlp|4 months ago

As I mentioned on another comment, I think there are many Haskell and Scala refugees that eventually migrated to Rust, bringing the same culture.

MoltenMan|4 months ago

I worked in Scala for a little bit and while it is mostly a fine language there are a couple huge problems; the big two off the top of my head are the return statement (legitimately the most wtf moment I've had learning a language???) and implicits (this one is more of a me problem but I really dislike implicits, both the variable passing in and the implicit constructors).