News for hackers. Stuff that matters.
Re:JDK 20 G1/Parallel/Serial GC Changes by vips7L on Friday March 17, 2023 @11:06AM (#35198020)
Scala is super complex, introduces breaking changes all the time, is super slow to compile, multi-language projects are also complex, and the decisions that are right for Scala may not be right for Java.
Re:JDK 20 G1/Parallel/Serial GC Changes by oweiler on Friday March 17, 2023 @11:12AM (#35198084)
Scala is also on the way out, adoption is steadily decreasing.
Re:JDK 20 G1/Parallel/Serial GC Changes by halfmatthalfcat on Friday March 17, 2023 @11:47AM (#35198640)
I'm not sure I would characterize it as "steadily". I think it's leveled off but I would agree it's not gaining any market share currently.
Re:JDK 20 G1/Parallel/Serial GC Changes by hf_twink on Friday March 17, 2023 @09:55PM (#35205291)
Yep, we’re migrating away from it at work too, too many problems, too slow to work with, and too much breaking.
Re:JDK 20 G1/Parallel/Serial GC Changes by bcrosby95 on Friday March 17, 2023 @11:52AM (#35198717)
I wish Scala leaned into being a Haskell-like (opinionated statically typed functional language) for the JVM rather than a kitchen sink.
Re:JDK 20 G1/Parallel/Serial GC Changes by suresk on Friday March 17, 2023 @04:40PM (#35202616)
There was definitely a large and vocal part of the community that wanted that, but I think early on there was a lot of tension between Scala being "better Java" and "Haskell for the JVM", and that probably hindered a lot of adoption.
Re:JDK 20 G1/Parallel/Serial GC Changes by gigatexal on Saturday March 18, 2023 @06:37AM (#35207881)
Hmm I was thinking of learning Scala. Good to know it’s on the down trend.
Re:JDK 20 G1/Parallel/Serial GC Changes by kaba0 on Saturday March 18, 2023 @07:25AM (#35208119)
I wouldn’t take these trends too seriously - scala is still huge, and the recent revamp (scala 3) might turn that “trend” around.

Also, learning a language with new idioms is always worth it, regardless of whether you end up using it.

Re:JDK 20 G1/Parallel/Serial GC Changes by ebruchez on Friday March 17, 2023 @02:09PM (#35200679)
The "super complex" and "introduces breaking changes all the time" comments are unsubstantiated FUD. Scala has evolved a lot in the last few years, particularly in the area of binary compatibility. It's a wonderful language and I can only recommend others try it. This from a programmer very happy with Scala.
Re:JDK 20 G1/Parallel/Serial GC Changes by vips7L on Friday March 17, 2023 @02:38PM (#35201074)
And this is from a programmer that is not happy with Scala. Every single time I've upgraded the compiler there is a breaking change. They don't strictly follow semver. Most recently upgrading from the 2.11 to 2.13 compiler they made breaking serial version uid changes (I know don't use java serialization, but that wasn't my decision) and none of it was noted in the release notes.

When it comes to super complex just look at any of the type signatures of the standard library for collections:

   def ++[B >: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[IndexedSeq[A], B, That]): That 
Comparing this to Java it is "super complex". IntelliJ can't even figure out the types sometimes.
Re:JDK 20 G1/Parallel/Serial GC Changes by suresk on Friday March 17, 2023 @04:48PM (#35202717)
And then when a dependency of one of your dependencies is broken agains the latest version. I know some of this has been cleaned up, but it is one of the main reasons I no longer use Scala - I have a rule about how long I'm willing to spend on build issues vs actually writing code, and Scala was always on the wrong side of that.

re: Complexity - At least the signatures for the core collections have been cleaned up a fair amount. That said, the richness of the type system and the prevalence of operator overloading always made it feel like a language you could be really productive in once you knew the language and the current codebase really well, but was really hard to just read through unfamiliar code and know what is going on.

Re:JDK 20 G1/Parallel/Serial GC Changes by kagakuninja on Saturday March 18, 2023 @02:48PM (#35211942)
> And then when a dependency of one of your dependencies is broken agains the latest version

How is this any worse than Java? My most vexing dependency-hell issues have involved breaking API changes to Hamcrest matchers and Apache Http Client; more recently Jackson-databind. All of those are Java libraries, brought in via transitive dependencies, usually from Java libraries.

Re:JDK 20 G1/Parallel/Serial GC Changes by ebruchez on Friday March 17, 2023 @08:58PM (#35204906)
I don't know about the serialization issue but I don't doubt you had it.

> def ++[B >: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[IndexedSeq[A], B, That]): That

I should point out that this is the Scala 2.12 and and earlier signature. `CanBuildFrom` is gone from the Scala collections since Scala 2.13. In fact, the collections were redesigned for Scala 2.13 primarily to simplify method signatures, following community feedback.

Re:JDK 20 G1/Parallel/Serial GC Changes by kaba0 on Saturday March 18, 2023 @07:22AM (#35208102)
Scala 3 came out not too long ago and it fixed plenty of shortcomings. I do recommend giving it one another try.

Also, the reason why Scala’s collection has such complex signatures is because it is hands down the best collection lib out of any language I have used.

Re:JDK 20 G1/Parallel/Serial GC Changes by vips7L on Saturday March 18, 2023 @09:04PM (#35214885)
Nah the language is dead to me. And for petty reasons I don’t like significant white space. I only use it now because of work.
Re:JDK 20 G1/Parallel/Serial GC Changes by kaba0 on Sunday March 19, 2023 @04:17AM (#35217026)
It still supports the older brace-style as well, doesn’t it?
Re:JDK 20 G1/Parallel/Serial GC Changes by ebruchez on Monday March 20, 2023 @01:23PM (#35235110)
Absolutely.
Re:JDK 20 G1/Parallel/Serial GC Changes by vips7L on Tuesday March 21, 2023 @05:27PM (#35252812)
Right and I don’t want to have to deal with half the community being split. Or half my coworkers doing it one way. These are just things I don’t want to deal with. I said my reasons were petty! But they’re my reasons.