@@ -5,11 +5,14 @@ by: Julien Richard-Foy, Scala Center
5
5
title : Import Suggestions in Scala 3
6
6
---
7
7
8
- Scala’s implicits might be at the same time the most distinguished and the most
9
- controversial feature of the language. There is evidence that working with implicits can be a
10
- frustrating experience. Thankfully, the Scala 3 compiler will dramatically
11
- improve the quality of the error messages shown in case of missing implicit so
12
- that it will be easier to see _ where_ an implicit argument could not be inferred
8
+ Implicits let the compiler “write” significant parts of a program for you.
9
+ For instance, the compiler can summon JSON serializers and deserializers for
10
+ a complete type hierarchy.
11
+
12
+ However, working with implicits can be a difficult experience. Thankfully, the
13
+ Scala 3 compiler dramatically
14
+ improves the quality of the error messages shown in case of missing implicit so
15
+ that it is easier to see _ where_ an implicit argument could not be inferred
13
16
by the compiler, and _ how_ to fix the problem.
14
17
15
18
This article shows these improvements in action in concrete examples of code.
@@ -25,8 +28,8 @@ faced?”
25
28
We also saw that 35% of the respondents of the [ 2019 developer survey] signaled
26
29
that dealing with missing implicits was a main pain point in their daily
27
30
workflow. Furthermore, they signaled that the two most painful issues they had
28
- when working with implicits were “finding which parameters have been inferred”
29
- (46%), and “fixing 'implicit not found' errors” (41%) . Last but not least, the
31
+ when working with implicits were “finding which parameters have been inferred”,
32
+ and “fixing 'implicit not found' errors”. Last but not least, the
30
33
word that was most mentioned by the respondents to describe their other pain points
31
34
related to implicits is the word “import”.
32
35
0 commit comments