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.
-
-
Compare that to a "normal" (non-context) function parameter, where one user will write `{ r => ... }`, another will write `{ req => ... }` and another will write `{ httpRequest => ... }`. Any user reading that code needs to learn the parameter name for each use site.
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
"imagine" as if you didn't just put that into a new library
Jon.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Either this or everything will have names summon[Blah]
-
If a shorter name for `summon` could have been found, I might have preferred that, actually. I still use `summon` in place of named `using` parameters because it's more explicit about what it's doing, and means I can use context bounds.
- Show replies
New conversation -
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.