Hacker News new | ask | show | jobs
by tekacs 3321 days ago
Folks commenting on the willingness to make breaking changes in 'Scala' should note that this is Dotty, an upcoming very eventual breaking replacement for Scala (think Python 3 or perhaps even Perl 6 but less radical than the latter).

For now, to quote the authors, it's a: 'Research platform for new language concepts and compiler technologies for Scala'

So this is exactly the right place to test this sort of concept.

1 comments

Yes, but they're unusually willing to make significant breaking changes in point releases as well — how many times now (including, IIRC, one or more ongoing efforts) have they rewritten the collections API? Yes, that's a standard library change, not a language change, but still.

And this is a huge breaking change: if they make it you won't be able to convert your Scala 2.1X code to Dotty/Scala 3 by simply fixing all the compiler errors; you'll either need a foolproof automated conversion tool or to hand-audit your entire codebase.

Well they last rewrote the collections API in Scala 2.8 (I think), which was in 2010. If they redo it in 2.13 that'll have been about 8 years. That's certainly not C++ levels of backwards compatibility, but it's hardly frequent.

They do make some other breaking changes in 2.xx releases (which come out about every 1.5 - 2 years!), but I wouldn't really call them point releases, given that the 2.x hasn't changed in over a decade - that's like saying Python shouldn't make breaking changes in Python 2.6 -> 2.7. They don't generally make breaking changes in actual point releases (2.XX.yy).

Also, they're building an automated conversion tool (https://www.scala-lang.org/blog/2016/10/24/scalafix.html) for Dotty. As I said, compare this to Python 3. The Scala -> Dotty rewriter should be able to be more complete than 2to3 was however, mostly because they're not fixing many ambiguities like 2to3 was with encoding. Their rewriter is also based on a full sophisticated framework that can parse or unparse multiple versions of Scala, including Dotty, in one build.

Hopefully being able to rewrite a much, much higher percentage of code and the backporting of changes into Scala 2.13+ will make Dotty adoption happen faster (than Python 3) when it comes.

What kind of version number scheme does Scala use where breakage is allowed in point releases?
Epoch.major.minor
I've been programming Scala almost 4 years, and I only know one collections library. I think it's pretty excellent to work with, but I'm even more excited about the upcoming changes.
How is it a breaking change? It is pretty straightforward to write an automated tool to convert one syntax into another one.
It's even easier to write a converter considering the strong typing in Scala; a lot less room for ambiguity than with Python's 2to3.