Skip to content

Commit 89c3f6f

Browse files
committed
Address comments
1 parent 34b6b17 commit 89c3f6f

File tree

1 file changed

+46
-29
lines changed

1 file changed

+46
-29
lines changed

docs/blog/_posts/2019-03-01-13th-dotty-milestone-release.md renamed to docs/blog/_posts/2019-03-04-13th-dotty-milestone-release.md

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: blog-page
33
title: Announcing Dotty 0.13.0-RC1 with Spark support and redesigned implicits
44
author: Aggelos Biboudis
55
authorImg: /images/aggelos.jpg
6-
date: 2019-03-01
6+
date: 2019-03-04
77
---
88

99
Hello hello! This is the second release for 2019, let's call it the _Contextual_
@@ -13,22 +13,23 @@ Without further ado, today we release the version 0.13.0-RC1 of the Dotty compil
1313
This release serves as a technology preview that demonstrates new language features and the
1414
compiler supporting them.
1515

16-
Dotty is the project name for technologies that are considered for inclusion in Scala 3. Scala has
17-
pioneered the fusion of object-oriented and functional programming in a typed setting. Scala 3 will
18-
be a big step towards realising the full potential of these ideas. Its main objectives are to
16+
Dotty is the project name for technologies that are being considered for
17+
inclusion in Scala 3. Scala has pioneered the fusion of object-oriented and
18+
functional programming in a typed setting. Scala 3 will be a big step towards
19+
realising the full potential of these ideas. Its main objectives are to
1920

2021
- become more opinionated by promoting programming idioms we found to work well,
2122
- simplify where possible,
2223
- eliminate inconsistencies and surprising behaviours,
23-
- build on strong foundations to ensure the design hangs well together,
24+
- build on strong foundations to ensure the design hangs together well,
2425
- consolidate language constructs to improve the language’s consistency, safety, ergonomics, and
2526
performance.
2627

2728
You can learn more about Dotty on our [website](https://dotty.epfl.ch).
2829

2930
<!--more-->
3031

31-
This is our 132th scheduled release according to our
32+
This is our 13th scheduled release according to our
3233
[6-week release schedule](https://dotty.epfl.ch/docs/usage/version-numbers.html).
3334

3435
# What’s new in the 0.13.0-RC1 technology preview?
@@ -62,9 +63,9 @@ varied number of use cases, among them: implementing type classes, establishing
6263
context, dependency injection, expressing capabilities, computing new types and
6364
proving relationships between them.
6465

65-
However, we identify a few side-effects that implicits gave rise to, as a
66+
However, we identify a few consequences that implicits gave rise to, as a
6667
programming style. Firstly, users used implicit conversions between types, in an
67-
undisciplined matter. This overuse of implicit conversions declattered code for
68+
unprincipled matter. This overuse of implicit conversions decluttered code for
6869
sure, but it made it harder for people to reason about.
6970

7071
```scala
@@ -77,14 +78,17 @@ implicit values and we identify that their semantic differences must be
7778
communicated more clearly syntactically. Secondly, implicits pose challenges for
7879
tooling such as error reporting for failed implicit searches. Furthermore, the
7980
`implicit` keyword is way too overloaded (implicit vals, defs, objects,
80-
parameters, or arguments) and users may use it as a mechanism rather than an
81-
intent. Another consideration is that the `implicit` keyword annotates a whole
82-
parameter section instead of a single parameter, and passing an argument to an
83-
implicit parameter looks like a regular application. This is problematic because
84-
it can create confusion regarding what parameter gets instantiated in a call.
85-
Last but not least, some times implicit parameters are merely propagated in
86-
nested function calls and not used at all, so names of implicit parameters are
87-
not always necessary.
81+
parameters). For instance, a newcomer can easily confuse the two
82+
examples above while they demonstrate completely different things, a typeclass
83+
instance is an implicit object or val if unconditional and an implicit def with
84+
implicit parameters if conditional; arguably all of them are surprisingly
85+
similar (syntactically). Another consideration is that the `implicit` keyword
86+
annotates a whole parameter section instead of a single parameter, and passing
87+
an argument to an implicit parameter looks like a regular application. This is
88+
problematic because it can create confusion regarding what parameter gets passed
89+
in a call. Last but not least, sometimes implicit parameters are merely
90+
propagated in nested function calls and not used at all, so names of implicit
91+
parameters are not always necessary.
8892

8993
Consequently, we introduce two new language features:
9094

@@ -154,7 +158,7 @@ implied ctx for ExecutionContext = currentThreadPool().context
154158
For symmetry, we define our well-known `implicitly` from `Predef` in terms of
155159
`given` and for simplicity we rename it to `the`. Functions like `the` that have
156160
only _inferable parameters_ are also called _context queries_ from now on.
157-
Consequently, to create an implied instance of `Ord[List[Int]]` we write:
161+
Consequently, to summon an implied instance of `Ord[List[Int]]` we write:
158162

159163
```scala
160164
the[Ord[List[Int]]]
@@ -188,7 +192,7 @@ parameters. Here is an example of such a function:
188192
type Contextual[T] = given Context => T
189193
```
190194

191-
Context queries--previously named implicit function types--are now also
195+
Context queries--previously named implicit function types (IFTs)--are now also
192196
expressed with `given`, providing types for first-class context queries. This is
193197
merely an alignment of IFTs into the new scheme.
194198

@@ -250,7 +254,7 @@ for a deep dive at the relevant PRs:
250254
[#5540](https://github.com/lampepfl/dotty/pull/5540) and
251255
[#5839](https://github.com/lampepfl/dotty/pull/5839).
252256

253-
`Multiversal equality` is now supported through the `Eql` marker trait (renamed
257+
_Multiversal equality_ is now supported through the `Eql` marker trait (renamed
254258
from `Eq` to differentiate it from Cats' `Eq`). For example, in order to be able
255259
to compare integers with strings now, instead of a custom implicit we can
256260
provide a derived implicit instance:
@@ -271,9 +275,26 @@ implied for Conversion[String, Token] {
271275
}
272276
```
273277

274-
It is worth mentioning that we now allow arbitrary definitions at the toplevel.
275-
This means package objects are now redundant, and will be phased out.
276-
You can read about [dropping package objects](https://dotty.epfl.ch/docs/reference/dropped-features/package-objects.html)
278+
_Top level_ definitions are now supported. This means that package objects are
279+
now redundant, and will be phased out. This means that all kinds of definitions
280+
can be written at the top level.
281+
282+
```scala
283+
package p.
284+
285+
type Labelled[T] = (String, T)
286+
val a: Labelled[Int] = ("count", 1)
287+
def b = a._2
288+
289+
case class C()
290+
291+
implicit object Cops {
292+
def (x: C) pair (y: C) = (x, y)
293+
}
294+
```
295+
296+
You can read about [dropping package
297+
objects](https://dotty.epfl.ch/docs/reference/dropped-features/package-objects.html)
277298
at the documentation linked or at the relevant PR
278299
[#5754](https://github.com/lampepfl/dotty/pull/5754).
279300

@@ -301,10 +322,6 @@ first prototype for the generation of SemanticDB information from TASTy.
301322

302323
## And much more!
303324

304-
Other significant changes in this release are the following:
305-
306-
307-
308325
Please read our [release notes](https://github.com/lampepfl/dotty/releases/tag/0.13.0-RC1)
309326
for more details!
310327

@@ -321,11 +338,11 @@ sbt new lampepfl/dotty.g8
321338
For more details on using Dotty with sbt, see the
322339
[example project](https://github.com/lampepfl/dotty-example-project).
323340

324-
## [Mill](http://www.lihaoyi.com/mill/)
341+
<!-- ## [Mill](http://www.lihaoyi.com/mill/)
325342
326343
The Mill build tool version 0.2.6 introduced experimental support for Dotty. For more details on
327344
using Dotty with Mill, see the
328-
[example project](https://github.com/lampepfl/dotty-example-project/tree/mill).
345+
[example project](https://github.com/lampepfl/dotty-example-project/tree/mill). -->
329346

330347
## IDE support
331348

@@ -338,7 +355,7 @@ Releases are available for download on the _Releases_
338355
section of the Dotty repository:
339356
[https://github.com/lampepfl/dotty/releases](https://github.com/lampepfl/dotty/releases)
340357

341-
For MacOs users, we also provide a [homebrew](https://brew.sh/) package that can be installed by
358+
For macOS users, we also provide a [homebrew](https://brew.sh/) package that can be installed by
342359
running:
343360

344361
```shell

0 commit comments

Comments
 (0)