News for hackers. Stuff that matters.
Re:From First Principles: Why Scala? by MrPowers on Thursday February 11, 2021 @10:35AM (#26102595)
In the Spark world, you can use a tiny subset of the Scala features and enjoy huge productivity gains over the other language APIs (Java & Python). Those productivity gains are wiped out as more crazy language features get used.

I don't think the super complex language features should be removed. Li's libs do some crazy stuff under the hood, but provide a clean, Python-like public interface. Most devs aren't that good and complex underlying implementations leak and yield complex public interfaces.

Lots of folks would love Scala codebases that only use 10% of the available language features and none of the complex frameworks. But, like you mentioned, it's a hard language to use responsibly.

Re:From First Principles: Why Scala? by noisy_boy on Thursday February 11, 2021 @12:15PM (#26104241)
I think the trick to using Scala is to read the high level/key features of the language (case classes/pattern matching/using Option/Some/None, type aliases etc) and basically stick to them. A good yardstick for what are those features is the Scala Book[0]. This is what I read before I started to actually code in Scala.

That coupled with side-effect free functional style (as much possible without overstretching) uses the power of Scala and keeps the code concise and readable. That is how I use it and find it very pleasurable to write in Scala compared to Java.

[0]: https://docs.scala-lang.org/overviews/scala-book/introductio...

Re:From First Principles: Why Scala? by bcrosby95 on Thursday February 11, 2021 @12:00PM (#26103994)
> Lots of folks would love Scala codebases that only use 10% of the available language features and none of the complex frameworks. But, like you mentioned, it's a hard language to use responsibly.

Does this have the same problem in large languages such as C++ though? Where everyone thinks there's an optimal subset of the language, but no one agrees on what that optimal subset is?

Re:From First Principles: Why Scala? by MrPowers on Thursday February 11, 2021 @12:07PM (#26104128)
Yep, there is even a talk on the Scala Infinity War which argues for one subset version of Scala that it needs in order to survive: https://www.youtube.com/watch?v=v8IQ-X2HkGE&ab_channel=Scala...

For me, Scala is a multi-paradigm language with tons of features. The community just needs different types of style guides for different apps. vars are horrifying for the functional crowd, but cool with me for example.

Re:From First Principles: Why Scala? by brabel on Thursday February 11, 2021 @01:19PM (#26105146)
> Lots of folks would love Scala codebases that only use 10% of the available language features and none of the complex frameworks.

They already do it: it's called Kotlin.

Re:From First Principles: Why Scala? by ta988 on Thursday February 11, 2021 @10:36PM (#26110508)
On the other hand Kotlin devs can also be really conservative in what they let creep into the language. But that's what I like about the language, it doesn't try to please everybody and that create a somewhat more rigid frame in which I'm more comfortable expressing myself.