4 ms·
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 perfo
by reader_mode 6y ago
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.
- lihaoyi 6y agoNot 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
- harryh 6y agoThis 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.
- lihaoyi 6y agoYeah 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-benchmark?orgId=1&from=now-5y&to=now 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!
- finiteloops 6y agoNot to mention how much Mill improved my dev cycle. Thank you for your contribution to the ecosystem!
- danmur 6y agoYep. I'm just a scala hobbyist but I'd have given up if I had to use SBT.
- cutler 6y agoBut is a bit better than dog-slow actually that great?
- throwawaygh 6y agoI 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.
- AzzieElbab 6y agoTo 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
- akhilcacharya 6y agoPascals are still the winner in compile time benchmarks!
- reader_mode 6y agoLet'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.
- AzzieElbab 6y agooh 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
- reader_mode 6y agoBut 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.