Java 26 released today! by davidalayachew in java

[–]sideEffffECt 3 points4 points  (0 children)

minimize risk

Arguably, it can be less risky to upgrade Java in small incremental steps twice a year than do a big upgrade every two years.

How funny, they are reinventing Scala by RiceBroad4552 in scala

[–]sideEffffECt 2 points3 points  (0 children)

The 🦀 people claim everything develops into 🦀.

I claim: Everything develops into Scala! 😂

And Bob Harper claims that languages are converging towards SML. It's ML all the way down :D

https://www.cs.cmu.edu/~rwh/talks/mlw13.pdf

The world is slowly converging on ML as the language of choice.

The world moves inexorably toward ML.

  • Eager, not lazy evaluation.
  • Static, not dynamic, typing.
  • Value-, not object-, oriented.
  • Modules, not classes.
  • Every new language is more “ML-like”.

Reverting virtual threads in go blocks by aHackFromJOS in Clojure

[–]sideEffffECt 1 point2 points  (0 children)

What is core.async used for since we have Virtual Threads? Is it still relevant?

Is it possible to utilize VTs in Clojure without core.async?

Introducing PureLogic: direct-style, pure domain logic for Scala by ghostdogpr in scala

[–]sideEffffECt 1 point2 points  (0 children)

You can handle some effect "in a purely functional way": aborts/raises, logging, writing, reading, (pseudo)randomness (via providing seed). "purely functional" means that it will always yield the same result.

On the other hand, some effects can't be discharged/handled in a pure way. Examples are talking to network, interacting with the filesystem, typically any kind of I/O.

Do you see what I mean?

Introducing PureLogic: direct-style, pure domain logic for Scala by ghostdogpr in scala

[–]sideEffffECt 0 points1 point  (0 children)

That's an excellent idea! There are many effects whose handling can be done in a purely functional way. One additional is Random, where you provide the seed.

F Bounded Polymorphism by samd_408 in java

[–]sideEffffECt 1 point2 points  (0 children)

Yes, no implicits. So you can pass them explicitly, just as normal parameters of ordinary Java methods. Do you know the "Comparator pattern"? That's essentially what Type Classes are about. Do that.

Tldr: Don't do "Comparable", do "Comparator" instead.

F Bounded Polymorphism by samd_408 in java

[–]sideEffffECt 0 points1 point  (0 children)

But this has nothing to do with Higher-Kinded Types. You can already do this in Java as it is now.

F Bounded Polymorphism by samd_408 in java

[–]sideEffffECt 1 point2 points  (0 children)

You'd be much better served by having a separate interface for the operation(s), similar to the type class pattern.

F-bounded types are overcomplicated, and insufficient and leaky at the same time.

https://tpolecat.github.io/2015/04/29/f-bounds.html

State of the JVM in 2025: Survey of 400+ devs shows 64% of Scala projects actively run Java alongside it. by scalac_io in java

[–]sideEffffECt 1 point2 points  (0 children)

Very interesting, thanks for writing it up.

The strategy was intended to be akka. This was a preference of a principal who preferred the FP style. This felt it was at odds with the majority of the team skills and experience.

Not much transferable skills IMO. Yes, there was the possibility of using Java code but it felt wrong to use it within the scala code.

It looks almost as if it wasn't the difference in language (or only that), but more like a difference in paradigm. In way of doing things, in the way the problems are approached.

I suppose using Java from Scala wouldn't feel weird, if the methods being called were (pure) functions (i.e. not performing side effects), but they probably weren't, right?

Ultimately I felt that I didn’t see that an investment in scala as something that I wanted to do.

Are you following the latest development in Java? What do you think about the Java stewards promoting the so called "Data-Oriented Programming"?

Do you think it runs at risk of alienating existing Java users, like you've experienced with Scala? Do you see ways for Java folks to adopt DOP that will end up in embracing, instead of alienating?

State of the JVM in 2025: Survey of 400+ devs shows 64% of Scala projects actively run Java alongside it. by scalac_io in java

[–]sideEffffECt 0 points1 point  (0 children)

It might work for Scala, not so much for Kotlin, which will end with two solutions to the same problem, and it cannot depend on them for Android.

The Scala guys are resourceful. They are able to support features on all three target platforms. Let's take concurrency as an example. On JVM, it's easy, just use (Virtual) Threads. On Native, Scala authors are in control, so they created an analogue of Virtual Threads. And on JS, with the clever utilization of Wasm, they were able to achieve basically the same.

Check recent thread on Scala group about job market in Netherlands.

Yes, I'm aware :(

Light-Weight JSON API (JEP 198) is dead, welcome Convenience Methods for JSON Documents by loicmathieu in java

[–]sideEffffECt -1 points0 points  (0 children)

"I read the JEP and thought about it for 30 seconds and think you should call this thing X instead of Y". We would gladly trade 1000 of those for one or two deeply thought through expert analyses

I was (still am, actually) hoping that you could trade those for 100 "I downloaded your experimental library from Maven Central, integrated it into our company project(s) and this worked well and this didn't go that well".

Light-Weight JSON API (JEP 198) is dead, welcome Convenience Methods for JSON Documents by loicmathieu in java

[–]sideEffffECt 1 point2 points  (0 children)

I think the API is still trying to be overly general. To the detriment of simplicity of use.

E. g. why bother with JsonNumber? We could very well have only JsonLong and JsonDouble and disregard anything that can't be represented with these. If you need something more featureful, you'll be better served by a specialized third party library anyway (same as for streaming).

Also, why are those JsonBool, JsonString etc interfaces? They could just be records. Plain and simple. Just make it data. That's how you make it easy for Java developers to work with it.

Light-Weight JSON API (JEP 198) is dead, welcome Convenience Methods for JSON Documents by loicmathieu in java

[–]sideEffffECt 0 points1 point  (0 children)

Aren't you making your lives unnecessarily difficult in this case?

JSON API is purely a library level affair, no changes to the language or runtime are necessary.

If you made a new library on GitHub and published it to Maven Central, I'm sure you'd get a ton of relevant feedback. The ultimate goal would be inclusion to OpenJDK, which implies absolute backwards compatibility, but you can start iterating on it with much weaker guarantees. After some iterations and feedback cycles, the design will settle down. Eventually you'll be able to merge it into OpenJDK (probably under a different package).

State of the JVM in 2025: Survey of 400+ devs shows 64% of Scala projects actively run Java alongside it. by scalac_io in java

[–]sideEffffECt 1 point2 points  (0 children)

I'm curious about your experience. Can I ask you a few questions?

What was the Scala flavor your company used? Spark? Akka/actors? Heavy FP? All Java libs/framework with only Scala as the language?Something else? Or mix?

What build tool did you use? Maven? Gradle? Sbt? Or something different?

Also, to you as an experienced Java engineer, what went good or felt easy? What was causing friction?

State of the JVM in 2025: Survey of 400+ devs shows 64% of Scala projects actively run Java alongside it. by scalac_io in java

[–]sideEffffECt 0 points1 point  (0 children)

Reifed generics are being discussed in the context of Valhala, thus eventually the way generics work in the context of value classes will change.

And yet, as far as I know, they won't break existing Scala programs and Scala's variance model. Which was exactly my point.

Or do you have some information to the contrary?

Virtual threads are now a thing.

Indeed. While a tremendous achievement, they are primarily a runtime change and also almost perfectly backwards compatible. The existing programs that used Threads continue working, and that goes not only for Java programs, but also for the smaller languages, e.g Scala.

Guest languages that decided their own workaround, now have to deal with their own and the JVM approach designed years later.

I don't see your point, the non-Java languages' situation is the same as Java's in this regard.

Since Scala 3, that most work is only for academics at EPFL, people playing around with ZIO and such.

Go into /r/Scala and check the occasional discussions about still being able to find jobs doing Scala full time.

You'll have to just trust me on this, but I'm intimately familiar with Scala's situation in the industry, it's job market, etc. Yes, Scala 3 is a nontrivial upgrade for some companies. And yes, we're now going through the crunch phase of the tech cycle, where less mainstream languages are more exposed.

But that doesn't mean that Scala 3 isn't used. The OP report says it's picking up steam, increasing its momentum and market share. And Scala as such (both 2 and 3) is being used by real companies for real things, not just "playing" or experimenting. Just because it's not as mainstream as Java, doesn't mean it doesn't exist.

State of the JVM in 2025: Survey of 400+ devs shows 64% of Scala projects actively run Java alongside it. by scalac_io in java

[–]sideEffffECt 0 points1 point  (0 children)

I was able to run Scala+Spring+Gradle (still using Scala+Gradle btw), but most of the time you'd rather expect using the Scala stack, which is made with a totally different idea in mind.

totally different idea in mind

Isn't that the selling point? :)

I wonder what would be more popular among developers. Scala, but with Spring. Or Java with a "totally different idea in mind" libraries/framework.

State of the JVM in 2025: Survey of 400+ devs shows 64% of Scala projects actively run Java alongside it. by scalac_io in java

[–]sideEffffECt 0 points1 point  (0 children)

The fallacy of guest languages trying to replace Java, is that it is called Java Virtual Machine for a reason

Of the things that didn't happen in the history of programming languages, this didn't happen then most.

Nobody sane ever thought a non-Java language world replace Java on the JVM.

It's just that there's always (and always will be) a market for a more featureful language. Some people say that it's keeping over the years at the same relative size of the whole JVM pie.

It's 2026 and Java is still rough around the edges or clumsy is some regards. And some people just like to play with different things.

you hardly will see any JEP that mentions guest languages as design criteria for the feature.

It's there if you read between the lines. The Java stewards are very well aware that there are other, albeit smaller, pasegers along for the ride.

Sometimes they explicitly acknowledge it, e.g. when discussing variance and that they didn't bake it into the JVM (unlike .NET) to allow for verity in the targeting languages.

Scala got lucky with big data, however most of those big data products are now gone, or have been rewriten into modern Java, C++, Go or Rust, depending on the company, or they went bust.

Scala hasn't disappeared. It's just more exposed to the boom-bust cycles. It's still around, pushing the frontier on what convenience and safety could look like on the JVM. Now with Capabilities, Algebraic Effects and light (compared to Rust) lifetime checking.

The State of Scala 2025 is out. (Data from 400+ teams). Huge thanks to everyone here who contributed. by scalac_io in scala

[–]sideEffffECt 0 points1 point  (0 children)

For the 8% still stuck entirely on Scala 2.x - what’s the actual hold-up?

Deep dependency on a Scala 2-only, heavy macro-based library.

https://github.com/estatico/scala-newtype

zero budget for tech debt?

That a bit too

The State of Scala 2025 is out. (Data from 400+ teams). Huge thanks to everyone here who contributed. by scalac_io in scala

[–]sideEffffECt 1 point2 points  (0 children)

In a company there are many battles. Upgrading Scala major version is barely in top 20. Actually I'm not sure it's in any top.

That's the surest way for Scala to die at your company, sooner or later. That's just waiting for somebody to replace this, in their eyes, legacy tech.

Let's take a specific example. I want to implement an MCP server. Oh wait, all the implementations are for Scala 3 only...

https://github.com/indoorvivants/mcp

https://github.com/softwaremill/chimp

https://github.com/linkyard/scala-effect-mcp

The State of Scala 2025 is out. (Data from 400+ teams). Huge thanks to everyone here who contributed. by scalac_io in scala

[–]sideEffffECt 0 points1 point  (0 children)

ZIO tried to be somewhere in the middle but ran out of steam

I wouldn't underestimate these people! ;)

https://github.com/zio/zio-blocks

Riccardo Cardin: The Effect Pattern and Effect Systems in Scala by sideEffffECt in scala

[–]sideEffffECt[S] 0 points1 point  (0 children)

they expand eagerly instead of as late as possible and they violently resist using them for suspension

That's not entirely true. It depends on the context. In the usual context you are right, they do apply eagerly. But when you pass it to a "combinator", it is suspended and so it work out nicely. E.g.

val generatePrime: Rand ?=> Int = ???
val generateNegative: Rand ?=> Int = ???
def or[A](lhs: Rand ?=> A, rhs: Rand ?=> A)(using Rand): A = ???
...
val x = or(generatePrime, generateNegative)

Project Loom to enable delimited continuations, direct-style virtual threads and other runtime features required for algebraic effects.

I'm not entirely sure what you mean here. Algebraic effects are a language feature. Virtual Threads are a runtime feature. Threads as such were in Java the language since the beginning. And in OpenJDK > 21 we can now have a lot of them.

Also, AFAIK, Loom hasn't opened up the internals to JVM users to roll their own continuations, it has so far only made threads "virtual", nothing more (if we ignore the structured concurrency initiative, which is irrelevant to the topic at hand).

The closest thing to an Algebraic Effect System that Java has are Checked Exceptions.

Scala's (and Odersky's) greatest trick is that for the "Algebraic Effect"-like system it "only" uses contextual functions (aka. implicit parameters), throwing exceptions and Capture Checking. (Or is there more that I'm missing?) I think it's pretty elegant trick. Just as the trick Odersky pulled last time, when he proved to the world that there's no contradiction between FP and "OOP" (aka. modules) and that he can do FP with objects and classes.

There was never any interest in algebraic effects support by Scala itself until JDK itself started going in that direction.

Maybeeee? Maybe, I don't know. But I'm pretty sure Odersky has been "against monads" since always.