As a former Scala fan, wow you aren't kidding, wth
val month = i match
case 1 => "January"
case 2 => "February"
// more months here ...
case 11 => "November"
case 12 => "December"
case _ => "Invalid month" // the default, catch-all
// used for a side effect:
i match
case 1 | 3 | 5 | 7 | 9 => println("odd")
case 2 | 4 | 6 | 8 | 10 => println("even")
// a function written with 'match':
def isTrueInPerl(a: Matchable): Boolean = a match
case false | 0 | "" => false
case _ => true
Yes, that's all just as it was, and in places braces were not required / interchangeable so this is more of an optional compiler choice than a real change
Scala 2's syntax is mostly Java/C-style with a few peculiarities.
Scala 3's optionally allows indentation based, brace-less syntax. Much closer to the ML family or Python, depending on how you look at it. It does indeed look better, but brings its share of issues.[1] Worse, a lot of people in the community, whether they like it or not, think this was an unnecessary distraction on top of the challenges for the entire ecosystem (libraries, tooling, ...) after Scala 3.0 was released.
My personal take is this would be like JavaScript adopting an optional Coffeescript[1] syntax. It's so different that it seems odd to make it an option vs a new language, etc.
Everything is up to date with the new syntax as far as I'm aware. Also, the compiler and scalafmt can rewrite one to the other. A project can pick whatever style it wants and have CI reformat code to that style.
There's still a working Eclipse plugin? Does Eclipse now support LSP servers?
The most reliable Scala IDE is currently Metals (in VSCode, but other editors work, too). Metals uses directly the compiler for all code intelligence so it's as reliable as the compiler itself.
> or Scala 2, yes, or there was the last I looked. Still the best Scala development experience by some margin, sadly.
I can't find it.
Could you link to that "best Scala development experience by some margin"?
All I know is that the Eclipse plugin is dead since about one decade. But maybe I just missed something.
> the integration/bridging piece is still flaky
What concrete issues do you have?
I'm using Metals on a daily basis and don't know about any such problems.
Could it be that the last time you've seen Scala (if you actually ever seen it at all) was about 10 years ago?
The discussions here on HN regarding Scala seem always massively dishonest, with a lot of people always spreading outright FUD for some reason I don't understand…
What I don’t get because there is LSP and BSP support. What else is needed to get support for scala 3 from an IDE? Obviously, Kotlin coming from Jetbrains will make it receive a lot more love and first class support.
I always find downvoting on stuff like this perplexing. It still isn't there. I know that a lot of Scala people are doing metals and some kind of text editor experience, but if you've used something as powerful as Intellij, the Scala 3 experience is a serious downgrade, and it still is today, even though it's better than it was a year ago.
Except the reason behind the syntax change is the losing mindshare from Scala into Python, after its relevance in the big data wave that predated the current AI wave.
Nothing to do with Haskell, even if it is also white space significant.
If anything is slowly down Scala 3 is that, including the tooling ecosystem that needs to be updated to deal with it.