You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/blog/_posts/2019-04-15-14th-dotty-milestone-release.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ For more information, please see the [documentation](http://dotty.epfl.ch/docs/r
124
124
125
125
Some of the other changes include:
126
126
127
-
-`infer` method renamed to `the`, the semantics of which is now the same as that of the `the` method of Shapeless. Namely, the implicits are resolved more precisely – see this [gist](https://gist.github.com/milessabin/8833a1dbf7e8245b30f8) for an example in Shapeless, and the Dotty [documentation](http://dotty.epfl.ch/docs/reference/contextual/inferable-params.html#querying-implied-instances) for more details.
127
+
-`infer` method renamed to `the`, the semantics of which is now the same as that of the `the` method of Shapeless. Namely, the implicits are resolved more precisely – see this [gist](https://gist.github.com/milessabin/8833a1dbf7e8245b30f8) for an example in Shapeless, and the Dotty [documentation](http://dotty.epfl.ch/docs/reference/contextual/given-clauses.html#querying-implied-instances) for more details.
128
128
- The syntax of quoting and splicing was changed. Now the quoting is expressed via `'{ ... }` and `'[...]` and splicing – via `${...}` and `$id`. Please see the [documentation](http://dotty.epfl.ch/docs/reference/other-new-features/principled-meta-programming.html) for more details on these features.
Copy file name to clipboardExpand all lines: docs/docs/reference/contextual/motivation.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,11 +47,11 @@ Existing Scala programmers by and large have gotten used to the status quo and s
47
47
48
48
The following pages introduce a redesign of contextual abstractions in Scala. They introduce four fundamental changes:
49
49
50
-
1. [Delegates](./instance-defs.html) are a new way to define basic terms that can be synthesized. They replace implicit definitions. The core principle of the proposal is that, rather than mixing the `implicit` modifier with a large number of features, we have a single way to define terms that can be synthesized for types.
50
+
1. [Delegates](./delegates.html) are a new way to define basic terms that can be synthesized. They replace implicit definitions. The core principle of the proposal is that, rather than mixing the `implicit` modifier with a large number of features, we have a single way to define terms that can be synthesized for types.
51
51
52
-
2. [GivenClauses](./inferable-params.html) are a new syntax forimplicit _parameters_ and their _arguments_. Both are introduced with the same keyword, `given`. This unambiguously aligns parameters and arguments, solving a number of language warts. It also allows us to have several implicit parameter sections, and to have implicit parameters followed by normal ones.
52
+
2. [GivenClauses](./given-clauses.html) are a new syntax forimplicit _parameters_ and their _arguments_. Both are introduced with the same keyword, `given`. This unambiguously aligns parameters and arguments, solving a number of language warts. It also allows us to have several implicit parameter sections, and to have implicit parameters followed by normal ones.
53
53
54
-
3. [DelegateImports](./import-implied.html) are a newclassof imports that specifically importdelegatesandnothingelse. Delegates_mustbe_importedwith`import delegate`, aplainimportwillnolongerbringthemintoscope.
54
+
3. [DelegateImports](./import-delegate.html) are a newclassof imports that specifically importdelegatesandnothingelse. Delegates_mustbe_importedwith`import delegate`, aplainimportwillnolongerbringthemintoscope.
55
55
56
56
4. [ImplicitConversions](./conversions.html) are now expressed asdelegates of a standard `Conversion` class. All other forms of implicit conversions will be phased out.
57
57
@@ -63,8 +63,8 @@ This section also contains pages describing other language features that are rel
63
63
- [TypeclassDerivation](./derivation.html) introduces constructs to automatically derive typeclass delegates forADTs.
64
64
- [MultiversalEquality](./multiversal-equality.html) introduces a special typeclass
65
65
to support typesafe equality.
66
-
- [ImplicitFunctionTypes](./query-types.html) provide a way to abstract over givenclauses.
67
-
- [ImplicitBy-NameParameters](./inferable-by-name-parameters.html) are an essential tool to define recursive synthesized values without looping.
66
+
- [ImplicitFunctionTypes](./implicit-function-types.html) provide a way to abstract over givenclauses.
67
+
- [ImplicitBy-NameParameters](./implicit-by-name-parameters.html) are an essential tool to define recursive synthesized values without looping.
68
68
- [RelationshipwithScala2Implicits](./relationship-implicits.html) discusses the relationship between old-style implicits and new-style delegates and givenclauses and how to migrate from one to the other.
69
69
70
70
Overall, the new design achieves a better separation of term inference from the rest of the language: There is a single way to define delegates instead of a multitude of forms all taking an `implicit` modifier. There is a single way to introduce implicit parameters and arguments instead of conflating implicitwith normal arguments. There is a separate way to importdelegatesthatdoesnotallowthemtohideinaseaofnormalimports. Andthereisasinglewaytodefineanimplicitconversionwhichisclearlymarked as suchanddoesnotrequirespecialsyntax.
0 commit comments