Scastie, the online Scala playground, supports Dotty. This is an easy way to try Dotty without installing anything, directly in your browser.
The fastest way to create a new project compiled by Dotty is using sbt (1.1.4+)
Create a simple Dotty project:
$ sbt new lampepfl/dotty.g8
Or a Dotty project that cross compiles with Scala 2:
$ sbt new lampepfl/dotty-cross.g8
You can then start a Dotty REPL directly from your sbt project:
$ sbt > console scala>
For more information, see the Dotty Example Project
Start using the Dotty IDE in any Dotty project by following the IDE guide.
Releases are available for download on the Releases Section
of the Dotty repository. Releases include three executables:
scalac the Dotty compiler,
scalad the Dotty Documentation tool and
scala the Dotty REPL.
. └── bin ├── scalac ├── scalad └── scala
Add these executables to your
PATH and you will be able to run the corresponding commands directly
from your console:
# Compile code using Dotty $ scalac HelloWorld.scala # Run it with the proper classpath $ scala HelloWorld # Start a Dotty REPL $ scala Starting dotty REPL... scala>
If you're a Mac user, we also provide a homebrew package that can be installed by running:
brew install lampepfl/brew/dotty
In case you have already installed Dotty via brew, you should instead update it:
brew upgrade dotty