The syntax of implicits #1374
kyouko-taiga
started this conversation in
Language design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We discussed the syntax of implicit parameters with @dabrahams and @camio. It's been rightly pointed out that using
?
is a bad idea because the symbol is already strongly associated with optionals. We then came up with the following idea to replace this syntax:implicit
, replacing the current@given
annotation.implicit
after the colon in parameter lists.For example:
To support these choices I think we should also require that:
implicit
become a keyword to let the parser identify the beginning of a declaration without lookahead.fun f(x: implicit)
).Beta Was this translation helpful? Give feedback.
All reactions