Scala Questions

Hi, I put together a few questions related to Scala. Would someone be interested in answering any of them? I want to write a blog post based on the answers, as I genuinely believe it would be valuable for the community.

The questions:
What advantages do enums have in Scala 3 over sealed traits?
What would you say are the differences between enums in Scala 3 and Java?
What use cases do you envision for union types in Scala 3?
What improvements have been made to implicit in Scala 3?
What problems do you think opaque types help to solve?
How will new Scala 3 features benefit developers, such as singleton types, type lambdas, and match types?
What do you think about metaprogramming with Scala 3 macros, and what’s the difference with Scala 2?

1 Like

Martin has given many talks about Scala 3 over the past few years, explaining new features and the reasoning behind language changes. Most or all are available on YouTube. You might check those out.

2 Likes

What do you think about metaprogramming with Scala 3 macros, and what’s the difference with Scala 2?

The two big things to say here are:

  1. In Scala 3, you need macros less often, because Scala 3 offers new metaprogramming facilities that address some metaprogramming needs directly without involving macros. reference: Overview | Scala 3 Language Reference | Scala Documentation

  2. Scala 3 macros have been widely praised as easier to work with than Scala 2 macros were. Example: https://twitter.com/SethTisue/status/1453371110553051141 — of course that’s just one person saying that, but from what I’ve seen, it’s a representative reaction.

1 Like