/dotty

Research platform for new language concepts and compiler technologies for Scala.

Primary LanguageScalaOtherNOASSERTION

dotty

Join the chat at https://gitter.im/lampepfl/dotty

Dotty is a platform to try out new language concepts and compiler technologies for Scala. The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals), and try to boil down Scala's types into a smaller set of more fundamental constructors. The theory behind these constructors is researched in DOT, a calculus for dependent object types.

####Current status: Technology preview: currently unsupported, may be functionally incomplete or unsuitable for production use.

####Is it going to be the future Scala? Yes, eventually.

####Who's working on it? See github contributors page.

####What are the features that could make me consider trying it?

Feature Status
Union, Intersection and Literal singleton types Implemented
Fast compilation(phase fusion) Implemented
Trait parameters Implemented
@Static methods and fields Implemented
Colored Repl Implemented
Sbt incremental build Implemented
Non-blocking lazy vals Implemented
Option-less pattern matching(based on name-based patmat) Implemented
Function arity adaptation Implemented
Non-boxed arrays of value classes In progress
Working contravariant implicits In progress
Auto-Specialization In progress
Whole program optimizer In progress
Library defined optimizations In progress
HList & HMaps\Record types Under consideration
Implicit functions Under consideration
Effects Under consideration
Auto-completion in repl Under consideration
Spec Option-less pattern matching Under consideration
Multiverse equality Under consideration
Exhaustivity checks in pattern matching Under consideration
There are also plethora of small details such as per-callsite @tailrec annotations

####What are the complications that I can have If I start using Dotty? Dotty can use libraries compiled by scalac 2.11, but Scala scalac can't use libraries compiled by Dotty.
No existential types.
No macro support yet. We have big plans here.
No early initializers. No scala.DelayedInit. Use trait parameters instead.
Whole program optimizer will only work if all dependencies are compiled by Dotty.

####Can I write my code in a way that is going to be compatible with Scalac & Dotty? Yes, Dotty itself is a project that can be compiled by both Dotty and Scalac.
It's not very hard, and the biggest thing that you will likely miss is using macros.

####How can I try it out? https://github.com/lampepfl/dotty/wiki/Getting-Started. Here’s an example sbt project and instructions on how to set it up: https://github.com/smarter/dotty-example-project/
We have colored REPL :-). You can invoke it by running dotc -repl.

####We also have: Basic support for Scala.js,
Prototype of compilation to x86 native code(Shabalin)

####What about scalac: Scalac is the basis for stability in scala. We expect scalac & dotty to coexist for long time.

####Contributions are welcome! We invite you to help us build the future of Scala.
This is the best moment to participate, as everyone can make an impact.

####SI-2712? If scalac will put it into 2.12, we’ll mimic their behaviour. But we have bigger plans for HK-types.

Developers mailing list is https://groups.google.com/forum/#!forum/dotty-internals.