-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Xsource:3.0 overview #374
Comments
/cc FYI @odersky, @densh (for xml literal deprecation), @DarkDimius, @smarter |
Would it be possible to introduce deprecation warnings for the most simple syntactic changes in 2.12.x?
Already implemented in scalafix (since v0.1).
Should be easy to implement.
I believe there has been made some recent progress on an xml interpolator here: https://github.com/densh/scala-xml-quote once the interpolator is ready, I'm optimistic it will be possible to provide a scalafix migration for it.
This is currently implemented in not such a robust way with the scalafix-nsc compiler plugin. However, the scala.meta semantic api will soon add support for denotations (see scalameta/scalameta#808), which scalafix will switch to very soon. |
We'll target 2.13 for these features unless there's a compelling reason to have this in 2.12. 2.12.x is now only for bug fixes and performance improvements, in principle. |
Some other things to consider:
trait A { def foo: Any }
class B extends A { def foo = "hi" } // B#foo has type String in scalac, but Any in dotty
|
To be usable without losing too much power, this require supporting abstract lazy vals which scalac doesn't so far. |
Related: scala/scala3#1473 |
One more: Implicit vals of type Function1 are no longer considered when looking for implicit conversions, instead an explicit |
I don't see "scala.reflect-based macros" on either this or the Dotty ticket |
One of the big differences in the ABI would be solved by #408 (see dotty's AugmentScala2Traits phase). Other issue is name mangling in certain cases. |
2.14 isn't going to happen, so some of these have to be done in 3.0 instead. Some of these have actually already landed (such as non-overriding inner classes). Contributions here would be welcome, but I don't think we need a holder ticket open for this anymore. Also, the Scala Center is putting some efforts in, see scalacenter/scala-3-migration-guide. |
These migration scenarios can be addressed in multiple ways. We can lint or deprecate in Scala 2, without requiring |
For migration to 3.0, Scala 2.14 (or perhaps 2.13 where feasible) should offer a source level that does the following:
implicit
class member without explicit return type (perhaps still infer from RHS if it'snew T
)explicitly
inline
explicitly
to indicate implicit arguments is being passed explicitly (if not, assume we're passing in explicit arguments, and infer implicit ones)_
for type lambdas (kind-projector has to use?
, but_
would be more logical if we can migrate)&
forwith
xs@ _*
-->xs: _*
The text was updated successfully, but these errors were encountered: