Scala.reflect and Scala 3


Porting from

@lrytz asks:

What’s going to happen to scala.reflect in Scala 3?

@odersky says in

The future Scala 3 macro design is intended to replace the existing def macros and the scala.reflect infrastructure.

@smarter (who opened the PR) indicates:

I think it’s pretty clear that scala.reflect if it exists in Scala 3 won’t be recognizable since the current API exposes implementation details.

/cc @retronym from the thread too.


Also, I’d like to note the context of the discussion: what to do with the deprecated Manifest and friends. Candidates are:

  • Removal?
  • Indefinite deprecation for the lifecycle of Scala 2 and removal in Scala 3?
  • Un-deprecation?
  • Other?


Hmm. One data point: while I stopped using Manifest per se ages ago, I do use ClassTag extensively, to obtain the runtimeClass. Losing that would hurt – not irreplaceably, but the hassle would be considerable…


ClassTag works in Dotty, it doesn’t depend on scala-reflect even though it’s in the scala.reflect namespace.