Here’s a proposal to add implicit function types to Scala 3. An implicit function type
implicit A => B
is the logical first-class version of an implicit method
def m(implicit x: A): B
Here’s a link to the doc page.
- they are a fundamental way of scope injection
- they promise to make many patterns of implicit parameters more concise
- they can replace the reader monad at a ~ 10x speedup.
For details I refer you to the talks.
This proposal is open for discussion in the community and will be discussed in our next SIP meeting, where we’ll take all your feedback into account for the approval/dismissal of this feature.