News for hackers. Stuff that matters.
Re:Metals with Scala 3 by reader_mode on Thursday February 04, 2021 @06:39PM (#26031119)
Last time I tried scala it took forever to build a relatively small project and the compiler was a heavyweight ram gobbler, which translated to shitty IDE performance as well. Now granted last time I tried Scala was probably 6 years ago, but I honestly doubt they got that language to compile as fast as Go - so I don't really see the Python comparison.
Re:Metals with Scala 3 by lihaoyi on Thursday February 04, 2021 @06:44PM (#26031153)
Not as fast as Go, but straight compilation is about ~3x faster than 2015, with many improvements around incrementality and IDE speed that make things a lot better. Compilation still isn't "as fast as Go", but has probably approached "acceptable" now in 2021.

As one data point, "slow Scala compiles" was the #1 biggest developer complaint at my company when I joined in 2017, and nowadays that complaint doesn't even break the top 10. Scala compiles are not great, but not terrible.

A lot about Scala sucked in 2015, and I wouldn't recommend 2015 Scala to anyone, but it's not 2015 any more. 2021 Scala is what I'm talking about

Re:Metals with Scala 3 by harryh on Thursday February 04, 2021 @07:07PM (#26031306)
This is super interesting. I was a pretty early adopter of Scala, but our org grew fairly frustrated with in in 2013/14 due to the slow compiler. We invested a ton of effort into building tools to mitigate this problem (effort we'd rather have spent on our actual business).

I haven't really touched it beyond tiny toy projects since 2015 though. Really glad to hear that compilation speed has gotten so much better.

Re:Metals with Scala 3 by lihaoyi on Thursday February 04, 2021 @07:16PM (#26031402)
Yeah the effort to speed up compilation around Scala 2.12 really took off. You can see it in the compiler benchmarks:

https://scala-ci.typesafe.com/grafana/dashboard/db/scala-ben...

Where the better-files library went from taking ~700ms to compile in 2016 to ~230ms today. Definitely a huge improvement that our developers appreciate every day!

Re:Metals with Scala 3 by finiteloops on Thursday February 04, 2021 @07:39PM (#26031638)
Not to mention how much Mill improved my dev cycle. Thank you for your contribution to the ecosystem!
Re:Metals with Scala 3 by danmur on Friday February 05, 2021 @04:55AM (#26034676)
Yep. I'm just a scala hobbyist but I'd have given up if I had to use SBT.
Re:Metals with Scala 3 by cutler on Thursday February 04, 2021 @08:44PM (#26032106)
But is a bit better than dog-slow actually that great?
Re:Metals with Scala 3 by throwawaygh on Thursday February 04, 2021 @06:50PM (#26031191)
I compile large (~1M loc) Scala projects on a low-end 2016 laptop. It's not fast, but a clean compile run is reasonable and incremental compilation has gotten much better.
Re:Metals with Scala 3 by AzzieElbab on Thursday February 04, 2021 @07:33PM (#26031577)
To the best of knowledge only ocaml compiles as fast as go. Honestly I do not understand while compilation speed became such a hot topic in pl design. When you know the language, you can bake a lot logic in types alone, saves quite a bit of typing in tests
Re:Metals with Scala 3 by reader_mode on Friday February 05, 2021 @02:36PM (#26040296)
Let's say you're even with longer compile times vs time to cover it with tests - I'd still take writing the tests if they run fast enough and can be done asynchronously - long compile-run cycle breaks my flow and I end up getting distracted.
Re:Metals with Scala 3 by AzzieElbab on Friday February 05, 2021 @04:29PM (#26041452)
oh I am a cigarette smoker. I have time. But seriously just take a look at how much testing can be avoided with things like refined types alone
Re:Metals with Scala 3 by reader_mode on Friday February 05, 2021 @07:22PM (#26042914)
But even then you'd prefer to be able to choose when you break flow.

Also live reload doesn't work if your compiler isn't fast enough for the live part.

This all depends on the kind of work you do I guess- I've written plenty of C++ in the past where faster build wouldn't be as critical (but would be appreciated). I could never do frontend this way.

Re:Metals with Scala 3 by akhilcacharya on Thursday February 04, 2021 @08:16PM (#26031910)
Pascals are still the winner in compile time benchmarks!