Live data from Hacker News

Scala 3 Migration: Report from the field

blog.pierre-ricadat.com

61–70 of 124 posts

Re: Scala 3 Migration: Report from the field

#61

Earlier quoted context omitted.

I work in data engineering and Scala fades even in this field.

What's used instead? Python? (complete outsider, just curious.)

Python mostly, and Java if you are using Flink. We do both. The thing with Scala is, it's mostly linked to Spark, and then probably a good portion of the gigs out there using Spark are using Databricks, and Databricks is pretty expensive, so people are moving away from it. At least this has been my case for two companies -- one moved to self-host Vertica and the other is about to move to Flink.

Re: Scala 3 Migration: Report from the field

#62

Earlier quoted context omitted.

Yes. Java, Python.

Ok so boring things won. (Well I'm writing Java and Python every day outside Data context this is not dissing.)

Just curious what do you do? I'm thinking about moving away from data, maybe into something that is a little bit lower-level.

Re: Scala 3 Migration: Report from the field

#63

Migrated a Scala 2.8(!) era codebase to Scala 3. As OP explains, macros and abstract type projections tend to be the biggest pain points in complex applications; otherwise, with Scala Rewrite tool it's pretty straightforward. I think it's more inertia than anything else that more Scala 2 companies don't migrate. Unpopular opinion, but setting a Scala 2 sunset time would spur companies into action :) As it stands Akka…

While a bit late to the party, Akka on Scala 3 is perfectly viable nowadays, and they have a couple employees contributing to Scala 3.

The bigger issue comes from Databricks being the biggest Scala Center sponsor while holding the entire ecosystem back, for instance with their managed Spark runtime still on 2.12.

Re: Scala 3 Migration: Report from the field

#64

Scala used to be my hobby / enthusiast language. Introduced to it through a college course, and used a bit through school. Later, I would use it for Advent of Code, tinkered with a Scala Play webapp, and dream about using it professionally. Rust has almost completely filled that void now. Rust is native, I'm not waiting on the 1.0 release of `scala-native` anymore. The community around Rust seems to be enthusiastic a…

It depends on what you want to do, of course, but for back end servers the Rust ecosystem is relatively immature. There is nothing comparable to ZIO in Rust world, for example.

What's more important than the current state is the direction where it's heading. Rust has energy, vision and momentum - additionally it has a powerful niche that it dominates.

Scala has unfortunately fizzled out, I would say mainly because of incompetent leadership (or more precisely academia-driven) but also because the alternatives got much better since it got introduced (Java mainly). Which is a shame as it is a great language that offers elegance and great power.

Re: Scala 3 Migration: Report from the field

#65
post #17

I only allow myself to use Scala these days if follow some rules: no sbt (just Maven) and no Scala libraries (just Java ones). I never used fancy stuff like Cats anyways. Curious to hear who actually does, and for what.

I don't really mind sbt, but we migrated off maven a while back for gradle for java projects. There are some crazy sbt build scripts but it's fairly easy to keep things sane, but maybe the fact that sbt builds can look so different is an issue.

I really like the simplicity of the com-lihaoyi ecosystem but I also enjoy cats/fs2 and friends on occasion.

Re: Scala 3 Migration: Report from the field

#66
post #41

I didn't know the ecosystem wasn't on 3. It was released May 2021. It is a big change though.

Most of the ecosystem is on Scala 3, I think Spark would be the biggest piece pending to upgrade.

With spark 4 defaulting to scala 2.13, that does move things in the right direction since the 2.13 -> 3 interop is possible

Re: Scala 3 Migration: Report from the field

#67

Back when I used to use Scala, the biggest PITA was how every minor version bump you'd run into binary version incompatibilities that you'd only run into at runtime. Has that situation changed? I've always felt that Scala the language was always pretty nice, but Scala the ecosystem/tooling was moderately painful to work with. It was getting better over time, but they lost all the momentum they had.

It still seems bizarre to me that the Java ecosystem relies upon code-sharing through precompiled binary packages. Compared to for example Rust or Elixir where you only download source and build it locally so that everything is built with the same compiler and environment. This makes it absolutely trivial to debug your dependencies and even fork them when necessary. Most Java programmers wouldn't ever dream of doing…

That's actually a major drawback on Rust to be adopted in enterprise settings. Any GPL library statically compiled would force the entire codebase to be licensed under GPL as well.

Re: Scala 3 Migration: Report from the field

#68
post #53

Earlier quoted context omitted.

I use ZIO ( https://zio.dev ) and nothing really like it exists on any platform. You can wrap any computation in a single ZIO object e.g. normal, callback, future, promise etc. Which you can then chain together in different ways e.g. run them in parallel, sequentially, race them against each other and kill the loser, schedule in elaborate ways, run with a timeout and then run another if it’s exceeded etc. And it will…

EffectTS? :)

Not even close.

Re: Scala 3 Migration: Report from the field

#69
post #55

Earlier quoted context omitted.

> Scala Play webapp I feel like the biggest misstep that the Scala ecosystem and Typesafe/Lightbend did was that they didn't invest more in Play Framework. 10 or 12 years ago, Play had a lot of energy and momentum, and it's a kind of thing that has broad enterprise/start up appeal. But focus was always more on Akka and what seemed like really niche architecture astronaut stuff like Actors and Actor System Clusters an…

> I feel like the biggest misstep that the Scala ecosystem and Typesafe/Lightbend did was that they didn't invest more in Play Framework. 10 or 12 years ago, Play had a lot of energy and momentum, and it's a kind of thing that has broad enterprise/start up appeal. But focus was always more on Akka and what seemed like really niche architecture astronaut stuff like Actors and Actor System Clusters and Event Sourcing e…

I disagree, productivity and ergonomics drives plenty of popular tools - React, Laravel, Rails, React Native, etc.

Re: Scala 3 Migration: Report from the field

#70
I currently work at a company who is primarily writing in Scala. I really like Scala but assume my next role won’t be in that. Are my two best options Rust and Java if I want to keep some of the typing, functional style, and pattern matching while also moving to a more popular language?
Post reply on HN