@@ -10,21 +10,21 @@ Today, we are excited to release Dotty version 0.2.0-RC1. This release
10
10
serves as a technology preview that demonstrates new language features
11
11
and the compiler supporting them.
12
12
13
- This release is based on [ previous milestone] ( /blog/2017/05/31/first-dotty-milestone-release.html ) .
13
+ This release is based on the [ previous milestone] ( /blog/2017/05/31/first-dotty-milestone-release.html ) .
14
14
The highlights of this release are:
15
15
- substantial improvement of quality of generated code for pattern matching
16
16
- improvements in VS Code IDE stability
17
17
- support Windows in VS Code IDE
18
- - improved compatibility with scalac
18
+ - improved compatibility with scalac
19
19
- initial support for reproducible builds
20
20
21
21
22
22
<!-- more-->
23
23
24
24
This is our second scheduled release according to our [ 6-week release schedule] ( http://dotty.epfl.ch/docs/usage/version-numbers.html ) .
25
25
26
- # What’s in the 0.2.0-RC1 technology preview?
27
- The [ previous technology preview] ( /blog/2017/05/31/first-dotty-milestone-release.html ) has shipped new language planned for Scala 3:
26
+ ## What’s in the 0.2.0-RC1 technology preview?
27
+ The [ previous technology preview] ( /blog/2017/05/31/first-dotty-milestone-release.html ) has shipped new language features planned for Scala 3:
28
28
[ Intersection Types] ( http://dotty.epfl.ch/docs/reference/intersection-types.html ) ,
29
29
[ Union Types] ( http://dotty.epfl.ch/docs/reference/union-types.html ) ,
30
30
[ Trait Parameters] ( http://dotty.epfl.ch/docs/reference/trait-parameters.html ) ,
@@ -34,12 +34,12 @@ The [previous technology preview](/blog/2017/05/31/first-dotty-milestone-release
34
34
35
35
This technology preview is geared towards improving stability and reliability. It includes:
36
36
37
- - [ Local optimizations upstreamed from Dotty Linker] ( https://github.com/lampepfl/dotty/pull/2513 ) , [ 2647] ( https://github.com/lampepfl/dotty/pull/2647 ) by ([ @OlivierBlanvillain ] ( https://github.com/OlivierBlanvillain ) . See more details below.
38
- - [ Optimizing Pattern Matcher] ( https://github.com/lampepfl/dotty/pull/2829 ) by ([ @odersky ] ( https://github.com/odersky )
37
+ - [ Local optimizations upstreamed from the Dotty Linker] ( https://github.com/lampepfl/dotty/pull/2513 ) , [ 2647] ( https://github.com/lampepfl/dotty/pull/2647 ) by ([ @OlivierBlanvillain ] ( https://github.com/OlivierBlanvillain ) ). See more details below.
38
+ - [ Optimizing Pattern Matcher] ( https://github.com/lampepfl/dotty/pull/2829 ) by ([ @odersky ] ( https://github.com/odersky ) )
39
39
- [ Idempotency checks] ( https://github.com/lampepfl/dotty/pull/2756 ) are the first step to reproducible builds
40
- - [ Faster Base class sets] ( https://github.com/lampepfl/dotty/pull/2676 ) by ([ @odersky ] ( https://github.com/odersky ) and ([ @darkdimius ] ( https://twitter.com/darkdimius )
41
- - Huge number of fixes to IDE and Dotty Language Server covering:
42
-
40
+ - [ Faster Base class sets] ( https://github.com/lampepfl/dotty/pull/2676 ) by ([ @odersky ] ( https://github.com/odersky ) ) and ([ @darkdimius ] ( https://twitter.com/darkdimius ) )
41
+ - Numerous fixes to IDE and Dotty Language Server covering:
42
+
43
43
- [ Windows support for VS Code plugin] ( https://github.com/lampepfl/dotty/pull/2776 )
44
44
- [ Fix hover-on-type for implicitly converted expressions] ( https://github.com/lampepfl/dotty/pull/2836 )
45
45
- [ Fixes to find all references in external projects] ( https://github.com/lampepfl/dotty/pull/2810 ) , [ 2773] ( https://github.com/lampepfl/dotty/pull/2773/files )
@@ -49,44 +49,44 @@ This technology preview is geared towards improving stability and reliability. I
49
49
- [ Report errors on Dotty Language Server initialization] ( https://github.com/lampepfl/dotty/pull/2708 )
50
50
- [ Fixes to sbt setting up Dotty IDE] ( https://github.com/lampepfl/dotty/pull/2690 )
51
51
- General stability improvements [ 2838] ( https://github.com/lampepfl/dotty/pull/2838 ) , [ 2787] ( https://github.com/lampepfl/dotty/pull/2787 ) , [ 2692] ( https://github.com/lampepfl/dotty/pull/2692 )
52
-
52
+
53
53
- Scalac compatibility improvements:
54
-
54
+
55
55
- [ Support Scala 2.12 traits] ( https://github.com/lampepfl/dotty/pull/2685 )
56
56
- [ Fixes to handling of Scala 2 classfiles] ( https://github.com/lampepfl/dotty/pull/2834/files )
57
57
- [ Scalac parser crashes on Dotty.jar] ( https://github.com/lampepfl/dotty/pull/2719 )
58
-
58
+
59
59
- Java compatibility improvements:
60
-
60
+
61
61
- [ Fixes to handing of Java generic signatures] ( https://github.com/lampepfl/dotty/pull/2831 )
62
62
- [ java.lang.System.out is final but that's a lie] ( https://github.com/lampepfl/dotty/pull/2781 )
63
-
63
+
64
64
- Improved error messages:
65
-
65
+
66
66
- [ Nicer error message for "implicit function type needs non-empty parameter list"] ( https://github.com/lampepfl/dotty/pull/2821 )
67
67
- [ Nicer error message for nonsensical modifier combination] ( https://github.com/lampepfl/dotty/pull/2807/files ) , [ 2747] ( https://github.com/lampepfl/dotty/pull/2747 )
68
68
- [ Nicer error message for supercall inside @inline method] ( https://github.com/lampepfl/dotty/pull/2740 )
69
69
- [ Check that case classes don't inherit case classes] ( https://github.com/lampepfl/dotty/pull/2790 )
70
70
- [ Check that named parameters don't conflict with positional ones] ( https://github.com/lampepfl/dotty/pull/2785 )
71
71
72
72
- Improved command line handling:
73
-
73
+
74
74
- [ Support params in a file like @file .txt] ( https://github.com/lampepfl/dotty/pull/2765 )
75
-
75
+
76
76
- Type system stability:
77
-
78
- - [ Handle wildcard types in unions and intersections] ( https://github.com/lampepfl/dotty/pull/2742 )
77
+
78
+ - [ Handle wildcard types in unions and intersections] ( https://github.com/lampepfl/dotty/pull/2742 )
79
79
80
80
- Fixes to implicit search:
81
-
81
+
82
82
- [ Fix shadowing of higher order implicits] ( https://github.com/lampepfl/dotty/pull/2739 )
83
83
84
-
85
- ## Better generated code:
84
+
85
+ ### Better generated code:
86
86
87
87
As was [ spotted] ( https://twitter.com/gkossakowski/status/870243464528744449 ) by [ @gkossakowski ] ( https://twitter.com/gkossakowski )
88
- In the previous release Dotty was on par with Scala 2.11 in speed. But why is that?
89
- The reason is that Dotty compiled by dotty had really horrible code generated or pattern matching.
88
+ in the previous release Dotty was on par with Scala 2.11 in speed. But why is that?
89
+ The reason is that Dotty compiled by Dotty had really horrible code generated for pattern matching.
90
90
91
91
Let's illustrate on a simple example:
92
92
@@ -101,7 +101,7 @@ case class CC(a: Int, b: Object)
101
101
}
102
102
a + b
103
103
}
104
-
104
+
105
105
def booleans(a: Object) = {
106
106
val (b1, b2) = (a.isInstanceOf[CC], a.isInstanceOf[List[Int]])
107
107
(b1, b2) match {
@@ -113,8 +113,8 @@ case class CC(a: Int, b: Object)
113
113
```
114
114
115
115
116
- Dotty that was released in the previous milestone didn't contain any optimizations and generated horrible code for it.
117
- The java-with-goto code below is equivalent to what dotty hs generated.
116
+ The Dotty that was released in the previous milestone didn't contain any optimizations and generated inefficient code for it.
117
+ The java-with-goto code below is equivalent to what Dotty generated.
118
118
119
119
```
120
120
// output of dotc 0.1.2-RC1
@@ -175,7 +175,7 @@ The java-with-goto code below is equivalent to what dotty hs generated.
175
175
}
176
176
```
177
177
178
- Due to new optimizing pattern matcher, dotty now is able to generate the code below without ` -optimise `
178
+ Due to the new optimizing pattern matcher, Dotty now is able to generate the code below without ` -optimise `
179
179
180
180
```
181
181
// output of 0.2.0-RC1 without -optimise
@@ -223,7 +223,7 @@ Due to new optimizing pattern matcher, dotty now is able to generate the code be
223
223
```
224
224
225
225
You can clearly see that it's shorter ;-) and it actually does less work.
226
- If you additionally enable local optimizations, you get a pretty good code:
226
+ If you additionally enable local optimizations, you get decent generated code:
227
227
228
228
```
229
229
// output of 0.2.0-RC1 with -optimise
@@ -258,11 +258,11 @@ If you additionally enable local optimizations, you get a pretty good code:
258
258
}
259
259
```
260
260
261
- This code still has a major inefficiency: it allocates tuples.
262
- We plan to continue migration of local optimizations from Dotty linker that should allow us to generate code that is as
263
- good the one generated by Dotty linker with global analysis disabled:
264
-
265
- ```
261
+ This code still has a major inefficiency; it allocates tuples.
262
+ We plan to continue the migration of local optimizations from the Dotty Linker that should allow us to generate code that is as
263
+ good the code generated by the Dotty Linker with global analysis disabled:
264
+
265
+ ```
266
266
// output of Dotty linker https://github.com/dotty-linker/dotty/tree/opto
267
267
public int foo(Object x) {
268
268
CC cC;
@@ -277,7 +277,7 @@ good the one generated by Dotty linker with global analysis disabled:
277
277
}
278
278
return n + n2;
279
279
}
280
-
280
+
281
281
public boolean booleans(Object a) {
282
282
boolean bl = a instanceof CC;
283
283
boolean bl2 = a instanceof List;
@@ -286,7 +286,6 @@ good the one generated by Dotty linker with global analysis disabled:
286
286
}
287
287
return false;
288
288
}
289
-
290
289
```
291
290
292
291
## How can you try it out?
@@ -296,7 +295,7 @@ We ship with tools that help you try out the Dotty platform:
296
295
- [ sbt support, including retro-compatibility with Scala 2] ( https://github.com/lampepfl/dotty-example-project )
297
296
298
297
299
- You have several alternatives: use the ` sbt-dotty ` plugin, get a standalone
298
+ You have several alternatives; use the ` sbt-dotty ` plugin, get a standalone
300
299
installation, or try it online on [ Scastie] .
301
300
302
301
### sbt
@@ -314,16 +313,16 @@ using Dotty with sbt, see the
314
313
315
314
Releases are available for download on the _ Releases_
316
315
section of the Dotty repository:
317
- https://github.com/lampepfl/dotty/releases
316
+ [ https://github.com/lampepfl/dotty/releases ] ( https://github.com/lampepfl/dotty/releases )
318
317
319
- We also provide a [ homebrew] ( https://brew.sh/ ) package that can be installed by running
318
+ We also provide a [ homebrew] ( https://brew.sh/ ) package that can be installed by running:
320
319
321
320
```
322
321
brew install lampepfl/brew/dotty
323
322
```
324
323
325
324
In case you have already installed Dotty via brew, you should instead update it:
326
-
325
+
327
326
```
328
327
brew upgrade dotty
329
328
```
@@ -363,7 +362,7 @@ Join our [community build](https://github.com/lampepfl/dotty-community-build)
363
362
to make sure that our regression suite includes your library.
364
363
365
364
366
- To get started, see < https://github.com/lampepfl/dotty > .
365
+ To get started, see [ https://github.com/lampepfl/dotty ] ( https://github.com/lampepfl/dotty ) .
367
366
368
367
369
368
[ Scastie ] : https://scastie.scala-lang.org/?target=dotty
0 commit comments