Test all the things

Dotty: Scala without the backwards compatibility issues?

JAXenter Editorial Team

A look into the open source platform that could offer clues to the “the future of Scala”.


Imagine developing on a fresh, clean platform, free from a compatibility issues. Well, now you can! Specifically, Dotty: A platform you can jump on for trialling new language concepts and compiler technologies for Scala. And there’s more great news – the technology was open sourced just a few days ago.

In a Google Groups announcement, Typesafe co-founder Martin Odersky states that the motivation for the project is to create a space for testing out new ideas where you won’t be troubled by the “stringent backwards compatibility constraints” that dog regular Scala releases.

He’s keen to emphasise that this is no “castle-in-the-sky” project, and only the technologies the team believe will be most likely to benefit Scala and the ecosystem around it will be considered.

Ultimately, Dotty is all about simplifying Scala, stripping back to a smaller set of key features. Although the language has achieved its original goal of uniting OOP and FP, along the way, it’s picked up some extraneous features (for example XML literals and  existential types) that, whilst useful in some apps, have “turned out to be inessential for the main goal.”

Dotty is very much a work in progress at the moment, with just a frontend (parser and type-checker), and it’s still awaiting the transformation and code generation phases.

There’s a lot yet to be decided – for instance, whether it will flow into Scala or not. Over at Stack Overflow, Odersky advised one programmer looking to make his Scala work forward-compatible with the new platform to avoid structural types containing a type members.

He added that, “Those type members are the elements that make type-checking in Scala turing complete, and I am not yet sure whether we want to support that in dotty. Structural types that contain only vals and defs will likely stay supported.”

By the way, in case you’re wondering about the cutesy sounding name, it’s shorthand for Dependant Object Types – the theoretical underpinnings for which you can find here in fulsome academic glory. In the future, you may well find technologies explored in this project popping up in Scala, but that’s a long way off. For an early taste, head over to GitHub. Image by globochem3x1-1
Inline Feedbacks
View all comments