The authors of @flixlang have a nice paper surveying the need for exclusion in the wild on GitHub. (And yes, we can do all their examples).
dl.acm.org/doi/abs/10.114…
For us, the concrete problem was getting more of Scala's stdlib capture-checked, especially control and concurrency. The larger goal is capability tracking across all of Scala. TACIT uses the same machinery to statically limit what AI agents can do:
github.com/lampepfl/tacit
Few production languages track effects. Fewer can say "anything except this category".
A Future needs that: its callback may capture anything *but not* thread-local state.
Scala 3 now supports this with capability classifiers. Accepted at OOPSLA 2026 🎉
Programming languages aren’t dead. The problems are changing.
As software starts acting on our behalf, "what is this code allowed to do?" becomes a language question. That's what motivated tracked capabilities and Scala’s capture checking.
nightly.scala-lang.org/docs/reference…