An interesting consequence of Scala 3's context functions is that since the parameter's name isn't chosen at the call site (it's implicit), it's often accessed using a helper method, and that method will have a consistent canonical name across codebases. That helps readability.
-
Show this thread
-
Replying to @propensive
Just found a good use case for context function at work, but I will have to do it with scala 2 syntax for a bit before pushing the team to upgrade to scala 3.
1 reply 0 retweets 1 like -
Replying to @xelaxc
Luckily you still have the { implicit foo => ... } syntax in Scala 2, so in theory, that part of your upgrade should be just a matter of removing the lambda variable.
1 reply 0 retweets 0 likes -
Replying to @propensive
Indeed. But really excited about all the new toys coming with scala 3
1 reply 0 retweets 1 like
Replying to @xelaxc
Yes, I wasn't suggesting for a moment that you should stick with Scala 2! ;)
10:26 PM - 19 Apr 2021
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.