News for hackers. Stuff that matters.
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