Live data from Hacker News

Scala 3.0

github.com

151–160 of 292 posts

Re: Scala 3.0

#151

Earlier quoted context omitted.

I still don't see how Kotlin is involved. People drafting JEPs are well aware of how modern languages, including the ones running on the JVM, have evolved in the past decades. Kotlin is pretty late to the party and hasn't really brought anything new to the JVM (by choice), except for coroutines maybe. Edit: see pron's comment below.

Kotlin becomes the default on Android, more people are writing Kotlin, there's more pressure on Java to adopt the best Kotlin features. If you look at most of the recent additions to Java, they were in Kotlin from the beginning. This is no coincidence.

And they were in Scala, Groovy, C# ... before Kotlin was even a thing. There's zero evidence people on the OpenJDK governing board care about Android at all, rather the opposite.

Re: Scala 3.0

#152

Earlier quoted context omitted.

> Scala is not perfect but it’s very good. I like to refer to it as Haskell with an extra chromosome: slow, hard to comprehend, and incredibly strong. I'm lucky enough to write it in my day job and I feel like I'm living life on easy mode because of it. It'd take a lot of money to lure me back to garbage like Python/JS at this point.

It has one advantage compared to Haskell though: as a Java/Kotlin (or even Python or javascript) developer, you can start with it an be productive immediately. You can then slowly absorb new concepts until you are pretty much ready to write full-fledged Haskell. That's why some call it Haskellator. :) This also means that many codebases have different styles though, whereas in Haskell you have one style (FP).

With version 3 it has another: Haskell doesn't yet have dependent types.

Re: Scala 3.0

#153

It is so bad, that in julia functions are not first class. Instead, I would love to use scala 3 for machine learning since this is the perfect type system for such a task, but linear algebra support is not good enough.

What do you mean by "not first class"?

https://docs.julialang.org/en/v1/manual/functions/#man-anony...

Re: Scala 3.0

#154
post #44

Earlier quoted context omitted.

Java has not picked up a single feature from Kotlin yet (maybe nullability types someday?), and, in fact, opted for very different ones (e.g. contrast records vs. data classes, virtual threads vs. syntactic couroutines), although I guess Scala has provided some inspiration for some features, as Java's are closer to Scala's than to Kotlin's. ML is probably the biggest influence, with some Haskell flavour. But I find i…

What are you talking about? Java release notes look like a list of Kotlin features these days. Sealed classes, data classes, multiline strings, coroutines -> project loom, switch statement improvements to resemble Kotlin when statement, improvements to Streams to match Sequences.

You do realize there are plenty of languages out there, and most novel features appeared first in some minor research languages? Like, there is hardly anything original to kotlin on your list, sealed classes have been in scala forever, and are basically just algebraic data types. Data classes are.. data classes, multiline strings is a cool but very basic syntactic sugar available in millions of languages, coroutines have been around, and kotlin’s couroutines are nothing like project loom. The latter is more similar to go’s threads. Switch expressions have been in scala forever, but a pretty basic thing in FP languages.

Re: Scala 3.0

#155
post #55

Earlier quoted context omitted.

It has one advantage compared to Haskell though: as a Java/Kotlin (or even Python or javascript) developer, you can start with it an be productive immediately. You can then slowly absorb new concepts until you are pretty much ready to write full-fledged Haskell. That's why some call it Haskellator. :) This also means that many codebases have different styles though, whereas in Haskell you have one style (FP).

More importantly, you can use the mature ecosystem around Java (tools, libraries and so on).

Then again, considering the JVM's disastrous recent trajectory (Loom, JPMS, renewed wasted focus on Java-the-language, and so on) that doesn't seem like such a great upside anymore.

Re: Scala 3.0

#156
post #154

Earlier quoted context omitted.

What are you talking about? Java release notes look like a list of Kotlin features these days. Sealed classes, data classes, multiline strings, coroutines -> project loom, switch statement improvements to resemble Kotlin when statement, improvements to Streams to match Sequences.

You do realize there are plenty of languages out there, and most novel features appeared first in some minor research languages? Like, there is hardly anything original to kotlin on your list, sealed classes have been in scala forever, and are basically just algebraic data types. Data classes are.. data classes, multiline strings is a cool but very basic syntactic sugar available in millions of languages, coroutines…

Of course none of this is new, but the lead time from Kotlin adoption to Java adoption of all of them is near identical.

Re: Scala 3.0

#157
post #44

Earlier quoted context omitted.

Java has not picked up a single feature from Kotlin yet (maybe nullability types someday?), and, in fact, opted for very different ones (e.g. contrast records vs. data classes, virtual threads vs. syntactic couroutines), although I guess Scala has provided some inspiration for some features, as Java's are closer to Scala's than to Kotlin's. ML is probably the biggest influence, with some Haskell flavour. But I find i…

What are you talking about? Java release notes look like a list of Kotlin features these days. Sealed classes, data classes, multiline strings, coroutines -> project loom, switch statement improvements to resemble Kotlin when statement, improvements to Streams to match Sequences.

These aren’t ‘Kotlin features’ they’re just normal language features.

I really struggle to see Kotlin as being part of the debate here. These features are being driven by enterprise Java user pain points. And those people aren’t looking at Kotlin.

Re: Scala 3.0

#158
post #83
post #80

looking at the all time contributors, it further solidified my belief that a team of 2 to 3 solid engineers can almost take on any project that comes their way.

Given enough time

“3 women won’t birth 1 child in 3 months”

There are problems you simply can’t throw more developer at. Compilers are very much that.

Re: Scala 3.0

#159

Always wanted to look into Scala but it seemed very intimidating. Is there a good intermediate 'How to' for Scala 3 anyone can recommend?

I have the same issue, but that all the tutorials assume familiarity with Java.

Re: Scala 3.0

#160
Not a fan of the optional brackets. It feels like a huge, tone-deaf step back. It's also being agressively pushed for by the founder. Also, it adds "if then end if" to the mix as well. Sigh.

https://dotty.epfl.ch/docs/reference/other-new-features/inde...

RIP Code samples.

Many of the other features are nice adjustments.

Post reply on HN