News for hackers. Stuff that matters.
Re:Evolving Scala by epolanski on Wednesday March 26, 2025 @06:41AM (#43480717)
> Another common request is to “stop implementing features”.

Yes, it's a very common one shared by virtually all Scala 3 developers. Stop. At least for a couple of years.

Tooling and the community just can't keep up and the language is very good already that the focus should be on the ecosystem and not language.

But Scala devs are beyond deaf and that's what you get when a programming language is an ongoing research project on which many students and professors depend.

It's not enough to say "if we stop developing new features the language will die" when there's 0 evidence by it and a huge fatigue towards the relentless development coming from most of the community.

Re:Evolving Scala by btreecat on Wednesday March 26, 2025 @08:12AM (#43481313)
The tooling is IMO one of the leading causes of why the language has had a collapse in developer mind-share.

If we want to say it really doesn't matter what language we choose, because any solution can be cooked up regardless, it absolutely matters then what the tools around that language bring to the table.

Re:Evolving Scala by bishabosha on Wednesday March 26, 2025 @09:05AM (#43481852)
We have to be more specific about this “tooling” - what are you missing
Re:Evolving Scala by dmos62 on Thursday March 27, 2025 @04:25AM (#43491427)
Not sure why this is being downvoted. It's hard to do something actionable based on abstract critique.
Re:Evolving Scala by openplatypus on Wednesday March 26, 2025 @08:12AM (#43481316)
> Yes, it's a very common one shared by virtually all Scala 3 developers. Stop. At least for a couple of years.

Please avoid generalisation. Not "all".

Re:Evolving Scala by epolanski on Wednesday March 26, 2025 @08:31AM (#43481497)
Virtually.
Re:Evolving Scala by vaylian on Wednesday March 26, 2025 @10:22AM (#43482590)
Implicit
Re:Evolving Scala by xboxnolifes on Wednesday March 26, 2025 @01:17PM (#43484465)
Know it's generalization, you should also know generalizations aren't literal readings.
Re:Evolving Scala by sideeffffect on Wednesday March 26, 2025 @09:02AM (#43481806)
> > Another common request is to “stop implementing features”.

> Yes, it's a very common one shared by virtually all Scala 3 developers. Stop. At least for a couple of years.

I, for one, think Capture Catching can't arrive soon enough. It will allow us to write much simpler programs, getting an edge over modern Java & co. I'm very much looking forward to it.

Don't use experimental Scala features in production code. They may change or be removed. And they will likely lack support in IDEs. But that is a common sense.

Re:Evolving Scala by bishabosha on Wednesday March 26, 2025 @09:07AM (#43481865)
What do you want from the ecosystem?
Re:Evolving Scala by ATMLOTTOBEER on Wednesday March 26, 2025 @12:23PM (#43483915)
- faster compile times

- faster compile times

- faster compile times

- I want sbt+scalatest (the blessed build tool/test framework) to not leak memory constantly (https://olegych.github.io/blog/sbt-fork.html this is an issue I specifically run into)

- I want useful documentation when I ctrlclick into settingKeys in build.sbt

- I want Intellij to not bug out when you pass explicitly the implicit arguments required by a function that uses both context bounds and implicits

- I want intellij to always agree with the scala compiler

Re:Evolving Scala by sideeffffect on Wednesday March 26, 2025 @08:46PM (#43489225)
The first five points are fixed by using Mill

https://mill-build.org/mill/comparisons/why-mill.html#_perfo...

Re:Evolving Scala by KajMagnus on Thursday March 27, 2025 @01:56AM (#43490734)
I'd like better debugging of async call stacks. Seems that'll start working better, with Java 21 and virtual threads, so looking forward to that.

And support for Scala in [web frameworks for Java].

Still on Scala 2.13, so don't know what 3.* I'd want, more than what already exist

Re:Evolving Scala by redcannon218 on Wednesday March 26, 2025 @09:13AM (#43481921)
Unfortunately Rust is making the exact same mistake.

Edit: It focuses too much on the language instead of the ecosystem.

Re:Evolving Scala by pkolaczk on Wednesday March 26, 2025 @10:59AM (#43482985)
1. Rust has had 10x better tooling right from the start. Cargo vs SBT, no joke.

2. Rust has improved its compiler performance by >3x in the last 5 years.

3. Rust hasn't gotten any major new language feature in the last 6 years. Most language improvement is improving orthogonality of existing features.

4. Rust has an excellent backwards compatibility story also right from the start. Code/libraries written in 2015 can be still compiled and used together with code from 2025.

5. Rust has a serious backing from all major IDE / editor providers.

6. Rust has integrates easily with other languages and ecosystems. It's easier to call Rust from Python than to call Scala from Python. It's easier and more performant to call C from Rust than to call C from Scala. Things like that. It's sad that Scala even struggled with interoperability with Java; which should theoretically be easy as it is the same platform.

Seriously, doesn't look to me like the same mistakes. It's actually quite opposite.

Re:Evolving Scala by zozbot234 on Wednesday March 26, 2025 @11:49AM (#43483522)
> Rust hasn't gotten any major new language feature in the last 6 years. Most language improvement is improving orthogonality of existing features.

Rust also ships with a functioning epoch/edition system that makes it feasible to rework existing language features for improved generality, elegance etc. without losing backward compatibility. I'm not sure if Scala has anything like that.

Also, the nightly/stable split in Rust means that most new features don't reach the final adoption stage unless there's a very real consensus about their design. A lot of effort is made to get rid of incidental complexity wherever feasible, before the new features are actually stabilized.

Most language implementations that "haven't gotten any major new language feature in the last 6 years" would be described as broadly stagnant or stale, but Rust is quite different.

Re:Evolving Scala by redcannon218 on Wednesday March 26, 2025 @11:31AM (#43483313)
I need to hash something, one way or another, in virtually 100% of my projects. Where is SHA-256 in the standard library?
Re:Evolving Scala by pkolaczk on Wednesday March 26, 2025 @11:48AM (#43483512)
cargo add sha256
Re:Evolving Scala by anta40 on Wednesday March 26, 2025 @12:30PM (#43483991)
Rust standard library is minimalist (at least compared to Java/.NET), so no SHA-266.

If you want a more useful standard library, perhaps consider Go.

Re:Evolving Scala by pkolaczk on Wednesday March 26, 2025 @03:24PM (#43485988)
It is minimalist because it has to support many platforms and must be lightweight and easy to port. It also must be stable for a long time. Once something lands in the standard library, it is very hard to remove / modify / redesign. How many half-broken date time implementations Java ended up with?

But it makes up for the minimalist stdlib by making it a breeze to use third-party libraries.

Re:Evolving Scala by vaylian on Wednesday March 26, 2025 @05:22PM (#43487462)
There is no sha-256 in the C or C++ standard library either. A cryptographic hashing algorithm like sha-256 is not something that necessarily has to be in a standard library.

There's plenty of old modules in the Python standard library that hardly any one uses. But removing them would break backwards compatibility guarantees. The Rust project has decided that they want to keep the standard library lean. And this works well in practise, because cargo is a really good package manager.

Re:Evolving Scala by Sunscratch on Tuesday April 01, 2025 @03:12AM (#43543748)
>Rust has had 10x better tooling right from the start. Cargo vs SBT, no joke.

Cargo is a really good tool, but I wouldn't say it is 10x better than SBT.On the other hand, Scala can be used with different build tools: Maven, Gradle, Mill. With Rust you have no choice(or I'm not aware of). Rust-analyzer is better than metals, can't argue with that...

>Rust has improved its compiler performance by >3x in the last 5 years

Rust compiler is very slow. I can't imagine what compilation time was 5 years ago, but even now, it is incredibly slow, even compared to "slow" Scala compiler(which is no longer true). I'm working on a little project with bevy, and even on such small project compilation time sucks. You can't compare it with Scala, it's just completely different experience.

>Rust hasn't gotten any major new language feature in the last 6 years.

That's not true. Rust team handles these changes correctly. Rust has concept of "Editions", and every 3 years new edition introduces significant changes. I really like how editions work, it's a great way to maintain backwards compat.

>4 Mostly agree

>5 Fully agree

>It's easier and more performant to call C from Rust than to call C from Scala.

Yep, but it's not Scala but the JVM limitation. JNI sucks, but there is an effort to improve that (project Panama).

Overall, both Scala and Rust are great languages. Rust team has addressed many typical issues from the beginning. Scala had its mistakes, but moving in the right direction.

Re:Evolving Scala by pas on Wednesday March 26, 2025 @09:41AM (#43482195)
Care to elaborate on which changes do you consider a mistake?

---------

To me the goals are sensible the flagship goals (for 2025H1 for example [1]) are all about DX and focus on downstream devs and their needs (all hands, Rust in the kernel).

The usual problem of "compile times" [2] (usually link times and LLVM throughput and so on) are things that are being worked on, but fundamentally they all can only be solved by caching, incremental compilation, and better developer tooling that are not language problems.

[1] https://rust-lang.github.io/rust-project-goals/2025h1/goals....

[2] https://old.reddit.com/r/rust/comments/1if5wpm/high_hopes_fo...

Re:Evolving Scala by redcannon218 on Wednesday March 26, 2025 @10:42AM (#43482785)
Please see my edit
Re:Evolving Scala by culi on Wednesday March 26, 2025 @09:54AM (#43482319)
Rust is younger than Scala. It makes sense for it to still focus on features
Re:Evolving Scala by redcannon218 on Wednesday March 26, 2025 @10:43AM (#43482790)
But Go has proven that the ecosystem is way more important than the language.

It's time to shift priorities.

Re:Evolving Scala by pkolaczk on Wednesday March 26, 2025 @11:04AM (#43483032)
Yet it's Go that added big language features recently (generics, iterators, changing semantics of for loop) and not Rust. Rust hasn't gotten any new major features since adding async ~7 years ago. Rust is much more stable language-wise than Go, partly because it had much more features in 1.0, and Go has to gradually add them (what's next? enums?). It also has much more advanced mechanisms allowing to both evolve the language and not break existing code (editions). Things that neither Go nor Scala figured out yet.
Re:Evolving Scala by sideeffffect on Wednesday March 26, 2025 @11:04AM (#43483025)
Go has proven that people want cheap threads. If it didn't have it, it wouldn't get anywhere.

Now even Java has cheap threads (Loom).

And Go even has generics. Just 20-ish years later than Java. And it's likely that more features that now Java has will trickle into Go. If Go wants to survive.

All this to say that there is no space in the market for another language which is a stupid simple Algol. Go already occupies that space. And even Go will have to add features developers want/need, if it doesn't want to get cornered out of the market.

It's not only Scala that must evolve.

Re:Evolving Scala by zozbot234 on Wednesday March 26, 2025 @11:59AM (#43483623)
> Now even Java has cheap threads

If by "cheap threads" you mean M-on-N threads a.k.a. fibers/green threads, Java had that on Solaris well before Go.

Re:Evolving Scala by gf000 on Wednesday March 26, 2025 @01:11PM (#43484408)
That's not even remotely the same thing as the current virtual threads, that automagically turn (many kind of) blocking IO into non-blocking.
Re:Evolving Scala by zozbot234 on Wednesday March 26, 2025 @01:29PM (#43484580)
If "automagically" means "the way Golang does it" then that's kinda the whole point of M:N threads/fibers.
Re:Evolving Scala by gf000 on Wednesday March 26, 2025 @02:09PM (#43485031)
My point was that green threads are not at all the same as virtual threads.
Re:Evolving Scala by gf000 on Wednesday March 26, 2025 @01:08PM (#43484376)
> Now even Java

Java is one of the few languages that does have it, besides Erlang, Haskell and Go. That "even" is absolutely not warranted.

Re:Evolving Scala by culi on Wednesday March 26, 2025 @01:13PM (#43484433)
Go has proven that we still need the backing of large corporations for success in the tech world despite the fact that open-source powers most major tech companies today

Java needed Apple, Go needed Google, React needed Facebook, TypeScript needed Microsoft, etc

In this way Rust is actually a pretty unique success story in that there's no singular major tech firm pushing it

Re:Evolving Scala by packetlost on Wednesday March 26, 2025 @10:24AM (#43482609)
It... really isn't though?
Re:Evolving Scala by vaylian on Wednesday March 26, 2025 @01:37PM (#43484649)
> Edit: It focuses too much on the language instead of the ecosystem.

What do you mean by that? What is missing?

Re:Evolving Scala by pas on Wednesday March 26, 2025 @04:00PM (#43486504)
They mentioned SHA-256 as an example, here -- https://news.ycombinator.com/item?id=43483313
Re:Evolving Scala by pas on Wednesday March 26, 2025 @09:15AM (#43481943)
It's a fundamental misreading of the situation.

Language geeks want language geeking, what Scala users want is a "faster horse". (Faster compiler, nicer project/package manager [sorry sbt], incremental compiler, LSP-compatible compiler, and so on. All good and nice and completely valid and important things!)

Unfortunately usually corporate backers can deliver these things not language researchers.

There's no need for the tooling and community to keep up. If Scala 2.12 is so good for the community stick with it.

The obvious problem is that Scala 3 delivers features (and whatever Odersky et al. cooks up will likely be useful for a lot of Scala users) that incentivizes attention fragmentation.

Yes, it's true that the community cannot keep up. (Yet the community is not a hivemind, it was able to churn out so many effect libs over the years I lost count.)

But it's an unforced error to put this responsibility on the researchers.

Re:Evolving Scala by ATMLOTTOBEER on Wednesday March 26, 2025 @12:15PM (#43483792)
This is a fair characterization. Unfortunately Scala's corporate backing is weak compared to something like Java. So the people in the best position to give us a faster horse are in fact these researchers. :(
Re:Evolving Scala by pas on Wednesday March 26, 2025 @04:05PM (#43486603)
That might be so, and it's okay to kindly tell them that, but to me it seems the community is pretty abusive regarding the researchers sometimes. (Well, and ... in general, Scala drama was not unheard of over the years, powerful languages tend to attract people with their powerful vision. And of course said researchers' people skills tend to show some room for improvement from time to time.)

Anyway, squeezing water from stone might be easier than persuading certain folks :)