Skip to content

Commit 0a8a963

Browse files
authored
Merge pull request #4764 from dotty-staging/dotty-0.9.0-RC1-blogpost
Dotty 0.9.0-RC1 Blog post
2 parents e94a2e1 + 7f540db commit 0a8a963

File tree

1 file changed

+207
-0
lines changed

1 file changed

+207
-0
lines changed
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
---
2+
layout: blog-page
3+
title: Announcing Dotty 0.9.0-RC1
4+
author: Allan Renucci
5+
authorImg: /images/allan.jpg
6+
date: 2018-07-06
7+
---
8+
9+
Today, we are excited to release Dotty version 0.9.0-RC1. This release serves as a technology
10+
preview that demonstrates new language features and the compiler supporting them.
11+
12+
Dotty is the project name for technologies that are considered for inclusion in Scala 3. Scala has
13+
pioneered the fusion of object-oriented and functional programming in a typed setting. Scala 3 will
14+
be a big step towards realizing the full potential of these ideas. Its main objectives are to
15+
16+
- become more opinionated by promoting programming idioms we found to work well,
17+
- simplify where possible,
18+
- eliminate inconsistencies and surprising behaviors,
19+
- build on strong foundations to ensure the design hangs well together,
20+
- consolidate language constructs to improve the language’s consistency, safety, ergonomics, and performance.
21+
22+
You can learn more about Dotty on our [website](https://dotty.epfl.ch).
23+
24+
<!--more-->
25+
26+
This is our ninth scheduled release according to our [6-week release schedule](https://dotty.epfl.ch/docs/usage/version-numbers.html).
27+
The [previous technology preview](https://github.com/lampepfl/dotty/releases/tag/0.8.0-RC1) added
28+
support for sbt 1, introduced improved unchecked warnings and improved SAM type support.
29+
30+
## What’s new in the 0.9.0-RC1 technology preview?
31+
32+
### Improved REPL [#4680](https://github.com/lampepfl/dotty/pull/4680)
33+
The REPL now uses [JLine 3](https://github.com/jline/jline3) under the hood which improves on
34+
many aspects such as, auto-completions and multi-line editing. The REPL now also works on Windows!
35+
36+
37+
### Documentation support in the IDE [#4461](https://github.com/lampepfl/dotty/pull/4461), [#4648](https://github.com/lampepfl/dotty/pull/4648)
38+
The Dotty IDE will now display documentation while hovering over symbols that were previously
39+
compiled by the Dotty compiler. In the future, we plan to let users query the documentation
40+
in the REPL as well.
41+
42+
43+
### Drop requirement that implicit functions must be non-empty [#4549](https://github.com/lampepfl/dotty/pull/4549)
44+
We remove the arbitrary restriction that parameters of implicit functions must by non-empty.
45+
We can now write:
46+
```scala
47+
type IntProducer = implicit () => Int
48+
49+
def prod1: IntProducer = 1
50+
val prod2: IntProducer = 2
51+
```
52+
53+
An interesting observation is that by-name parameters can now be encoded as implicit function types:
54+
```scala
55+
def timed[T](op: => T): T = ...
56+
def timed[T](op: implicit () => T): T = ...
57+
58+
timed {
59+
fetch(url)
60+
}
61+
```
62+
63+
Both definitions above are equivalent.
64+
65+
66+
### Emit feature warnings for implicit conversions [#4229](https://github.com/lampepfl/dotty/pull/4229)
67+
Implicit conversions are easily the most misused feature in Scala. We now emit feature warnings
68+
when encountering an implicit conversion definition, just like Scala 2 does.
69+
70+
In addition, we also emit a feature warning when an implicit conversion is used,
71+
unless the conversion is:
72+
73+
- an implicit class
74+
- co-defined with the type to which it converts
75+
- predefined in `scala.Predef` or is the `scala.reflect.Selectable.reflectiveSelect` conversion
76+
(we might extend this to more conversions).
77+
78+
79+
### Optimise s and raw interpolators [#3961](https://github.com/lampepfl/dotty/pull/3961)
80+
`s` and `raw` string interpolators were known to be slower than their not type-safe counterparts:
81+
```scala
82+
s"Hello $name!"
83+
84+
// compared to:
85+
"Hello " + name + "!"
86+
```
87+
The compiler will now desugar the former into the latter. Special thanks to
88+
[Wojtek Swiderski](https://github.com/Wojtechnology) who contributed this feature to the Dotty
89+
compiler!
90+
91+
92+
### Support for compiler plugins [#3438](https://github.com/lampepfl/dotty/pull/#3438)
93+
Dotty now supports Compiler plugins. Compiler plugins let you customize the compiler pipeline
94+
without having to modify the compiler source code. A major difference compared to Scala 2 is
95+
that Dotty plugins must run after the type checker. Being able to influence normal type checking
96+
is a powerful feature but for production usages, a predictable and consistent type checker is
97+
more important.
98+
99+
Starting with 1.1.5 Dotty compiler plugins can be used with `sbt`. Please refer to the `sbt`
100+
[documentation](https://www.scala-sbt.org/1.x/docs/Compiler-Plugins.html) for more information.
101+
102+
For more information, visit the [Compiler Plugin](http://dotty.epfl.ch/docs/reference/changed/compiler-plugins.html)
103+
section of our documentation.
104+
105+
## Trying out Dotty
106+
107+
### sbt
108+
Using sbt 1.1.5 or newer, do:
109+
110+
```shell
111+
sbt new lampepfl/dotty.g8
112+
```
113+
114+
This will setup a new sbt project with Dotty as compiler. For more details on
115+
using Dotty with sbt, see the
116+
[example project](https://github.com/lampepfl/dotty-example-project).
117+
118+
### IDE support
119+
Start using the Dotty IDE in any Dotty project by following
120+
the [IDE guide](https://dotty.epfl.ch/docs/usage/ide-support.html).
121+
122+
123+
### Standalone installation
124+
Releases are available for download on the _Releases_
125+
section of the Dotty repository:
126+
[https://github.com/lampepfl/dotty/releases](https://github.com/lampepfl/dotty/releases)
127+
128+
We also provide a [homebrew](https://brew.sh/) package that can be installed by running:
129+
130+
```shell
131+
brew install lampepfl/brew/dotty
132+
```
133+
134+
In case you have already installed Dotty via brew, you should instead update it:
135+
136+
```shell
137+
brew upgrade dotty
138+
```
139+
140+
### Scastie
141+
[Scastie], the online Scala playground, supports Dotty. This is an easy way to try Dotty without
142+
installing anything. Note however that Scastie only supports Dotty 0.7.0-RC1.
143+
144+
## Let us know what you think!
145+
If you have questions or any sort of feedback, feel free to send us a message on our
146+
[Gitter channel](https://gitter.im/lampepfl/dotty). If you encounter a bug, please
147+
[open an issue on GitHub](https://github.com/lampepfl/dotty/issues/new).
148+
149+
## Contributing
150+
Thank you to all the contributors who made this release possible!
151+
152+
According to `git shortlog -sn --no-merges 0.8.0..0.9.0-RC1` these are:
153+
154+
```
155+
200 Nicolas Stucki
156+
155 Martin Odersky
157+
71 Allan Renucci
158+
42 Paolo G. Giarrusso
159+
27 Aggelos Biboudis
160+
25 Guillaume Martres
161+
22 Martin Duhem
162+
10 Sebastian Nadorp
163+
10 Wojtek Swiderski
164+
6 Olivier Blanvillain
165+
5 benkobalog
166+
4 Ingar Abrahamsen
167+
3 Ankit Soni
168+
2 Liu Fengyun
169+
2 Olivier ROLAND
170+
2 Fabian Page
171+
1 Roberto Bonvallet
172+
1 Fengyun Liu
173+
1 Zoltán Elek
174+
1 benkbalog
175+
1 Glavo
176+
1 dieutth
177+
1 fschueler
178+
1 mentegy
179+
```
180+
181+
If you want to get your hands dirty and contribute to Dotty, now is a good time to get involved!
182+
Head to our [Getting Started page for new contributors](https://dotty.epfl.ch/docs/contributing/getting-started.html),
183+
and have a look at some of the [good first issues](https://github.com/lampepfl/dotty/issues?q=is%3Aissue+is%3Aopen+label%3Aexp%3Anovice).
184+
They make perfect entry-points into hacking on the compiler.
185+
186+
We are looking forward to having you join the team of contributors.
187+
188+
## Library authors: Join our community build
189+
Dotty now has a set of widely-used community libraries that are built against every nightly Dotty
190+
snapshot. Currently this includes ScalaPB, algebra, scalatest, scopt and squants.
191+
Join our [community build](https://github.com/lampepfl/dotty-community-build)
192+
to make sure that our regression suite includes your library.
193+
194+
195+
[Scastie]: https://scastie.scala-lang.org/?target=dotty
196+
197+
[@odersky]: https://github.com/odersky
198+
[@DarkDimius]: https://github.com/DarkDimius
199+
[@smarter]: https://github.com/smarter
200+
[@felixmulder]: https://github.com/felixmulder
201+
[@nicolasstucki]: https://github.com/nicolasstucki
202+
[@liufengyun]: https://github.com/liufengyun
203+
[@OlivierBlanvillain]: https://github.com/OlivierBlanvillain
204+
[@biboudis]: https://github.com/biboudis
205+
[@allanrenucci]: https://github.com/allanrenucci
206+
[@Blaisorblade]: https://github.com/Blaisorblade
207+
[@Duhemm]: https://github.com/Duhemm

0 commit comments

Comments
 (0)