Live data from Hacker News

Scala 3.0

github.com

71–80 of 292 posts

Re: Scala 3.0

#71

Earlier quoted context omitted.

How so? Kotlin doesn't even have proper pattern matching.

newb here -- please expand more on this. Are there stuff that kotlin's pattern-matching can't do?

Here's a quote from Reynolds, one of the creators of Spark:

> The primary issue I can think of comes from the lack of pattern matching. Kotlin’s language designer left out pattern matching intentionally because it is a complex feature whose use case is primarily for building compilers. However, modern Spark (post Catalyst / Tungsten) look a lot like compilers and as a result the internals would become more verbose if built using a language that doesn't support pattern matching.

Source: https://www.quora.com/profile/Reynold-Xin

Re: Scala 3.0

#72
post #32

Earlier quoted context omitted.

Literal types quite simply means that values are types. For example in TypeScript the literal type "Foo" is a special string type, where the only valid value is the literal "Foo" – assigning "Bar" to a variable with the type "Foo" is a compile time type error. Literal types can be combined into union types like any other type.

Sounds like more Scala sophistry. I thought they were supposed to be aiming for pragmatism with Scala 3.

I use it in Typescript often. Very useful.

type Verb = 'GET' | 'POST' | 'PUT' | 'DELETE';

export type TerminusType = 'ICAO' | 'IATA' | 'LOCODE' | 'ADDRESS' | 'LATLNG';

It's much better than just assuming it's a string and hoping you don't make a typo.

If the value is supplied from user input then it ensures that you write checks or switch cases.

Re: Scala 3.0

#73

Scala is not perfect but it’s very good. It’s competitive pressure arguably improved Java (streams, pattern matching, data classes).

> 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.

Or a lot less money :)

Re: Scala 3.0

#74

Earlier quoted context omitted.

How so? Kotlin doesn't even have proper pattern matching.

What they probably meant is that both Scala's and Kotlin's improvements pushed Java to improve. Both languages had many different features that back then weren't available in Java but since then got added to the Java language, and that made Java better, too.

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.

Re: Scala 3.0

#75

Amazing!!! Great to see Scala improving at such a fast pace! I'm especially excited about union/intersection types. I think we could all witness how well they work out in typescript and I believe that every language with the concept of subtyping should have this feature. It is one of the things that make working in a statically typed language feel much more dynamic/lightweight without giving up on safety guarantees.

From their blog:

> After 8 years of work, 28,000 commits, 7,400 pull requests, 4,100 closed issues – Scala 3 is finally out. Since the first commit on December 6th 2012...

I mean it is lot of work for sure. But is it such a fast pace?

Re: Scala 3.0

#76
post #32

Earlier quoted context omitted.

Literal types quite simply means that values are types. For example in TypeScript the literal type "Foo" is a special string type, where the only valid value is the literal "Foo" – assigning "Bar" to a variable with the type "Foo" is a compile time type error. Literal types can be combined into union types like any other type.

Sounds like more Scala sophistry. I thought they were supposed to be aiming for pragmatism with Scala 3.

They're describing typescript...

Re: Scala 3.0

#77

I can't find this anywhere, maybe someone could help answer: 1. How much better is the performance? (In terms of compilation speed, and runtime) 2. Compatibility with Graal Native?

Graal Native takes JVM bytecode as input, and Scala 3 is binary compatible with Scala 2, so it should be compatible with Graal Native out of the box.

Re: Scala 3.0

#78
post #75

Amazing!!! Great to see Scala improving at such a fast pace! I'm especially excited about union/intersection types. I think we could all witness how well they work out in typescript and I believe that every language with the concept of subtyping should have this feature. It is one of the things that make working in a statically typed language feel much more dynamic/lightweight without giving up on safety guarantees.

From their blog: > After 8 years of work, 28,000 commits, 7,400 pull requests, 4,100 closed issues – Scala 3 is finally out. Since the first commit on December 6th 2012... I mean it is lot of work for sure. But is it such a fast pace?

It is.

Scala does not use semver. The last major release was 2.13.0, not 2.0.0. That's a bit confusing I guess.

What that means is, they haven't just added some features, they redesigned/rewrote to language from ground up to simplify it and make formally sound. I actually don't know any other language that does that (though I'm sure there are others, maybe Haskell is one of them).

In addition, a lot of features are very impactful and unprecedented, such as match types. To me, for a mainstream language (even though a smaller one), it certainly feels fast pasted.

Re: Scala 3.0

#79

Scala is not perfect but it’s very good. It’s competitive pressure arguably improved Java (streams, pattern matching, data classes).

I think apart from streams it was Kotlin that did the trick.

Kotlin doesn't sound like a good language to bet on since most suitable(for jvm) features it has will be integrated by Java now that it has picked up pace.

I guess it only has decent marketshare because of google's android support(they are throwing stuff on the wall to move away from Oracle IP i guess) and Jetbrains being very popular among java devs.

Re: Scala 3.0

#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.
Post reply on HN