Skip to content

Commit 8fa54f5

Browse files
committed
Add witness as a modifier
1 parent b6dd21e commit 8fa54f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/witnesses/discussion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ Several alternatives to the proposed syntax changes for implicit parameters were
5353
3. The design presented here, but with `implicit` instead of `witness` as the modifier for
5454
parameters. This is closer to the status quo, but migration presents problems: At what point will an `implicit` modifier stop having the old meaning and acquire the new one? Using `witness` instead of `implicit` solves that problem because old and new styles can coexist and it is always clear which is which.
5555
4. Don't split the meanings of implicitly passed parameters and witness parameters. Use prefix ‘.’ as a syntax
56-
for both meanings together. This is more concise and relieves the programmer from needing to choose
56+
for both meanings together. This is more concise and relieves the programmer from having to choose
5757
which combination of functionality is desired. On the other hand, this does not support some
5858
use patterns such as MacWire style dependency injection. Also, the prefix ‘.’ syntax is maybe
5959
a bit too inconspicuous at the parameter definition site, even though it works very well at the
6060
function application site.
6161
5. As in 4., but using `witness` or `implicit` as the syntax that marks an implicitly passed witness parameter.
6262
This breaks the correspondence between function abstraction and application syntax.
6363

64-
Once we have high-level witness definitions and witness parameters it's a small step to convert most the remaining uses of `implicit` to `witness` as a modifier. There are no hard technical reasons for doing so, but it looks more consistent with the other changes.
64+
Once we have high-level witness definitions and witness parameters it's a small step to convert most the remaining uses of `implicit` to `witness` as a modifier. There are no stringent technical reasons for doing so, but it looks more consistent with the other changes.

0 commit comments

Comments
 (0)