-
Notifications
You must be signed in to change notification settings - Fork 326
Blog post. Scala 2 Roadmap Update: the Road to Scala 3 #1098
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few suggestions below, but overall LGTM.
Thanks for the suggestions! I batched them all but then when trying to commit it turns out I don't have permission. @lrytz could you either check the box to allow outside committers or redo the accept all changes? |
@sjrd: is this ok to merge today given the follow up commit? |
|
||
* **Runtime performance of generated code**. The code generation phase of the Scala 3 compiler is the same as in Scala 2.13, and also the ABI (the way Scala features are encoded in class files) in Scala 3.0 will be the same. We expect that code compiled with Scala 3 will perform the same, and we will work with the community to verify that this is the case. The Scala 2 optimizer will also be available in Scala 3. | ||
|
||
* **Performance-oriented language features**. While value classes continue to work, Scala 3 brings [opaque type aliases](https://dotty.epfl.ch/docs/reference/other-new-features/opaques.html) that provide type abstraction without any overhead. [Inline methods](https://dotty.epfl.ch/docs/reference/metaprogramming/inline.html) can be used for methods that are guaranteed to be inlined at compile-time. Scala 3 currently does not implement specialization. We will work with maintainers of performance-sensitive projects to find out what variants of specialization need to be supported. This work will likely land in a Scala 3.x minor release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the Scala 2 library uses specialization for Function1 etc. and Tuple2 etc., doesn't this mean that even seemingly innocuous code like
def foldInts(zero: Int, op: (Int, Int) => Int, array: Array[Int]) = {
var acc = zero
var i = 0
while (i < array.length) { acc = op(acc, array(i)); i += 1 }
acc
}
is going to get like 40x slower due to boxing?
Or is this already fixed? If it's fixed, now is probably a good time to mention it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We handle function specialization by hand so that one is probably OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth mentioning it, then. Maybe link to any docs on what is handled by hand (just function literals?). Most uses of specialization are rather esoteric, but this one isn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to have this discussion on discourse!
|
||
Together with the Scala 3 team at EPFL (aka the Dotty team), led by Martin Odersky, we have decided that, rather than developing Scala 2.14, our efforts should go to Scala 3 instead. | ||
|
||
While we're very excited to shift our focus to Scala 3, we will continue to maintain Scala 2.13 to ensure the community has ample time to carefully transition to Scala 3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"While we're very excited" should probably be "While the Lightbend team is very excited", since otherwise the "we" here defaults to include Martin, who shifted his focus to Scala 3 a long time ago.
@adriaanm OK to merge from me, yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the confusion about "we" right at the start really ought to be improved before this is published. (see resolved conversation) Everything else is strong, I think. (I see many good changes and additions since the last draft I saw 👍 )
Thanks everyone. I think it's more important this goes out today so that we can discuss on contributors over the next few days before the break. |
No description provided.