News for hackers. Stuff that matters.
Re:Kotlin becomes second most popular language on the JVM by insulanian on Thursday February 06, 2020 @01:52AM (#22253999)
I was surprised to see that Clojure scored better than Scala. Is Scala loosing its appeal? Did Dotty scare people away, because it smells like Python 2 vs 3?
Re:Kotlin becomes second most popular language on the JVM by minerals29 on Thursday February 06, 2020 @04:52AM (#22254801)
Scala is a nice language but I fear it suffers from internal politics between FP purists and people who simply want things getting done with the former pulling their side of the blanket harder and harder. This alone can alienate a portion of people who are not so much into FP language theory. Besides, a significant amount of Scala tooling is outdated or outright abandoned. Look at all those libraries like Breeze, Saddle, Scalalab. I am not even talking about scalaz vs cats drama. And while all this mess is going on, the Scala team keeps working on a new compiler for Scala 3, sigh.
Re:Kotlin becomes second most popular language on the JVM by jvican on Thursday February 06, 2020 @06:02AM (#22255105)
There's a tension between people using Scala for pure FP and people preferring to opt into pure FP whenever the model domain is needed, or that don't care about tracking every effect in their program and just focus on the 80/20. There are also those that use Scala for data science and other use cases for quick prototyping.

The interests of all of these parties are different and that's what sometimes causes tensions, but these tensions do also exist in other programming languages that aim at a broad audience. Just look at Rust. Languages that do not show these tensions are languages owned by only one party (most of the time, a company) and that are the only stewards of the project and those controlling the agenda. The good thing about Scala is that it's flexible and it allows you to use it for your use case regardless of whether the language designers want to support your use case or not.

Your claim about Scala tooling being outdated or outright abandoned is not true. There has never been as good tooling as Scala has today, with a lot of innovation happening in the field. The reality is that Scala has really good tooling, on par with that of Kotlin and Java, and sometimes even better. Just look at projects such as Metals, Scalafix, Ammonite, mill, bloop or Scala Steward to get an idea of what I'm talking about.

Also, the Scala team is not working on Scala 3, Martin Odersky's team at EPFL --LAMP-- is. The Scala team at Lightbend is working on keeping improving Scala 2 and making sure tooling is still as good as it gets for when Scala 3 is finally released.

There are lots of people in the Scala community that are not so much into "FP language theory" or category theory and just see its potential as a cross-platform language to prototype and write robust software.

Re:Kotlin becomes second most popular language on the JVM by minerals29 on Thursday February 06, 2020 @01:48PM (#22258945)
>The good thing about Scala is that it's flexible and it allows you to use it for your use case.

It's always tempting to agree to language X being flexible to suit everyone's needs but I would agree with John A. De Goes on that it should be either functional rather than something in the middle. Being flexible is only good on the surface, once it comes to actual daily work like reading other people's code expressiveness quickly becomes a burden.

>Your claim about Scala tooling being outdated or outright abandoned is not true.

I might have been trapped in my own little domain of data science guy and I don't know about other cool active libraries but whenever I dig something useful, it appears to be some PhD project left-overs or "last commit 5 years go" case. It's frustrating and doesn't encourage you to proceed working with the language.

So, if I ask, how does Scala future look like now that we have Java keeping up the pace with Kotlin basically sweeping the JVM newcomers and even Clojure looking good? I go read the Scala 3 goals and struggle to feel the same excitement over intersection types, better implicits, union types, type lambdas, DOT calculus of all things and all this at the cost of "Scala 3 won't be binary compatible with Scala 2" :) I am sorry but doesn't it look like a neck breaking academic crusade into oblivion? I think it does but time will tell of course.

Re:Kotlin becomes second most popular language on the JVM by jvican on Friday February 07, 2020 @06:36AM (#22265048)
> on that it should be either functional rather than something in the middle.

I don't think the same thing, and other people developing the Scala language don't either, so it's a respectable opinion but tells you very little about what Scala is and will become. Scala 3 is catering for the Pythonistas and there are lots of important fixes that make the language easy to use for them.

The reality is there are lots of languages that are flexible. The important part is where they are flexible. In Java, you can do pretty much anything you want at runtime. Same with Ruby or Python. You can actually do pretty complicated stuff that screws up local reasoning about the code.

Scala is flexible at compile-time by having an expressive language. Some of this expressiveness has been sacrificed in Scala 3 to make the language simpler. But the foundational stuff stays there and time will tell how successful this release will be.

On your comments of Scala 3 and Scala 2 being binary incompatible, maybe you have missed all along that there will be no binary breaking compatibility with TASTY and the goal is that you will be able to mix Scala 2 and Scala 3 code within the same codebase.

> I might have been trapped in my own little domain of data science guy and I don't know about other cool active libraries but whenever I dig something useful, it appears to be some PhD project left-overs or "last commit 5 years go" case.

Again, check out the tooling projects I've mentioned before. Many of them don't either exist in other languages. I don't know what you're referring to with some PhD tooling project. I've been in the business of doing OSS tooling for Scala and working on the compiler toolchain for a long time. If your definition of "useful" tooling includes projects such as LMS, which was a research project, then there clearly is a mismatch between what good and useful tooling is for you and for me.

Re:Kotlin becomes second most popular language on the JVM by hota_mazi on Thursday February 06, 2020 @02:21PM (#22259310)
> The Scala team at Lightbend is working on keeping improving Scala 2 and making sure tooling is still as good as it gets for when Scala 3 is finally released.

This is not true at all, Scala 2 is officially abandoned with the entire team now focused on Dotty [1]:

> we have decided that, rather than developing Scala 2.14, our efforts should go to Scala 3 instead.

[1] https://www.scala-lang.org/2019/12/18/road-to-scala-3.html

Re:Kotlin becomes second most popular language on the JVM by jvican on Friday February 07, 2020 @06:27AM (#22264992)
No, you're misreading that announcement. The Scala team is working, today, on improving Scala 2.13.x and improving the migration and tooling path to Scala 3, as I said before. The fact that 2.14.x won't be release has nothing to do with the fact that there's a team of 5 or 6 people working on Scala 2 today.
Re:Kotlin becomes second most popular language on the JVM by gbersac on Thursday February 06, 2020 @11:03AM (#22257052)
I think the strong inclination of scala toward FP is its main feature. It differentiate itself in a world dominated by OO languages.

Also leaning toward FP is not theoretical zealotery, FP really helps to create more robust software (no null, better error handling, better concurrency).

Re:Kotlin becomes second most popular language on the JVM by iLemming on Thursday February 06, 2020 @01:31PM (#22258753)
So you're easily dismissing the idea that Clojure might have become more mature, ergo more appealing? It's an extremely pragmatic choice, striving for elegance and simplicity, whereas Scala is rather more confusing than straightforward.
Re:Kotlin becomes second most popular language on the JVM by Jach on Thursday February 06, 2020 @02:34PM (#22259460)
My favorite snarky quote along these lines: "With Scala you feel smart having just got something to work in a beautiful way but when you look around the room to tell your clojure colleague how clever you are, you notice he left 3 hours ago and there is a post-it saying use a Map." --Daniel Worthington-Bodart
Re:Kotlin becomes second most popular language on the JVM by dehrmann on Thursday February 06, 2020 @01:55AM (#22254013)
My feeling is that between sbt being painfully slow and Java 8 getting lambdas, people lost interest in Scala.
Re:Kotlin becomes second most popular language on the JVM by ofrzeta on Thursday February 06, 2020 @02:37AM (#22254221)
Maybe. I just wanted to point out that there's Mill as a build tool for Scala: https://github.com/lihaoyi/mill

(by the Scala.js maintainer Li Haoyi)

Re:Kotlin becomes second most popular language on the JVM by saityi on Thursday February 06, 2020 @10:21AM (#22256594)
The last time I gave Mill a shot, I couldn't find a way to authenticate into private artifactory repositories, which made it kind of a nonstarter. Do you know if this has since been added?
Re:Kotlin becomes second most popular language on the JVM by Fellshard on Thursday February 06, 2020 @02:08AM (#22254073)
That, and it's one-way interop - calling Scala from Java is a deathly proposition.
Re:Kotlin becomes second most popular language on the JVM by zmmmmm on Friday February 07, 2020 @03:09PM (#22270330)
For me this is the bigger problem. With Groovy and to a lesser extent Kotlin I can write code and ship a library and the consumers don't even know it's source is Kotlin. But it's much harder with Scala. Especially with Groovy you are really not leaving the Java ecosystem at all.
Re:Kotlin becomes second most popular language on the JVM by trumpeta on Thursday February 06, 2020 @02:42AM (#22254247)
I think most of the perceived sbt slowness actually comes from dependency resolution and that's the same for Java and Kotlin
Re:Kotlin becomes second most popular language on the JVM by slimed on Thursday February 06, 2020 @01:56AM (#22254021)
Ding
Re:Kotlin becomes second most popular language on the JVM by cryptos on Thursday February 06, 2020 @04:21AM (#22254697)
I think Scala hast lost most of its appeal due to Kotlin. Scala has some really powerful and clean concepts, but tooling is not as good as Kotlin's. Scala has a much steeper learning curve, and Scala code can look very different depending on who wrote it. These are all drawbacks in real world projects.

With Kotlin you get like 80 % of the good things from Scala for 20 % the efforts.

I've switched from Scala to Kotlin 3 years ago and didn't miss much (real pattern matching come to mind).

Re:Kotlin becomes second most popular language on the JVM by minerals29 on Thursday February 06, 2020 @04:44AM (#22254771)
Yep, pattern matching is probably one of the main things missing in Kotlin.
Re:Kotlin becomes second most popular language on the JVM by ofrzeta on Thursday February 06, 2020 @02:48AM (#22254271)
From what I understand it's based on a survey. So who knows what are the biases and other preconditions of the results. Also 2.6 and 2.9 percent is not a huge difference.
Re:Kotlin becomes second most popular language on the JVM by insulanian on Thursday February 06, 2020 @06:55AM (#22255351)
I agree it's not a big difference, but I was under the impression (apparently a wrong one) that Scala is at least twice as popular as Clojure.
Re:Kotlin becomes second most popular language on the JVM by iLemming on Thursday February 06, 2020 @07:29PM (#22261978)
Clojure is definitely growing. Slowly, steadily, but growing nevertheless. There are more Clojure-specific conferences today than of Haskell, Elixir, OCaml, Elm, Prescript, Racket or Rust. There are more books and podcasts. Last year alone there were new conferences announced in Canada, Brazil, Russia, Ukraine and India. Almost every European country has its own Clojure-conf, some have multiple.

Of course it is still much smaller than Java, but Clojure can also be hosted on JS, BEAM or .Net. There's even a way to interop with Python and R.

Clojure is one of the nicest [production-ready] languages out there. It's pretty cool what it has achieved, with pretty much zero marketing effort and without support from big companies.

Re:Kotlin becomes second most popular language on the JVM by fulafel on Friday February 07, 2020 @02:13AM (#22263855)
I think it's more about Clojure doing very well than Scala doing badly.
Re:Kotlin becomes second most popular language on the JVM by badtooling on Thursday February 06, 2020 @02:05AM (#22254060)
No it's not a py2 vs py3 situation at all. It's fud.

Scala suffers due to bad tooling. As somebody else said.

I'd still urge people to try out scala as a much better typescript (scala.js) for web

Re:Kotlin becomes second most popular language on the JVM by manojlds on Thursday February 06, 2020 @02:26AM (#22254175)
Wouldn't Kotlin for JS be that?
Re:Kotlin becomes second most popular language on the JVM by ofrzeta on Thursday February 06, 2020 @02:38AM (#22254232)
What's the problem with the Scala plugin for IntelliJ?
Re:Kotlin becomes second most popular language on the JVM by jvican on Thursday February 06, 2020 @06:04AM (#22255113)
It can often give false positives, but it's mostly okay and lots of people really enjoy it. It has innovated a lot on finding better ways of showing types.

It'd be good if the OP elaborates on what "bad tooling" we have in the Scala community given that today Scala's tooling is good and on par with that of Kotlin and Java.

Re:Kotlin becomes second most popular language on the JVM by lmm on Thursday February 06, 2020 @10:10PM (#22262910)
It still can't reliably highlight errors. Every version of it either highlights some kinds of working code as being an error, or fails to highlight some kinds of error.
Re:Kotlin becomes second most popular language on the JVM by gbersac on Thursday February 06, 2020 @11:05AM (#22257081)
No much now (except being slow on weak laptop). Scala Intellij's plugin has dramatically improved over the years.