gavinray 2 days ago

The idea of "Context-Oriented Programming" is really interesting.

Recently, Kotlin has added this in the name of "Context Parameters", and Scala 3 has them as "given"/"using" traits.

https://blog.jetbrains.com/kotlin/2025/04/update-on-context-...

https://docs.scala-lang.org/scala3/reference/contextual/usin...

There are a bunch of practical applications for this sort of pattern, but the most generally useful ones are for framework-less Dependency Injection and for decoupling implementation-site details IMO.

Happy to see this idea gaining popularity recently.