Back to Developer Roadmap

Capture checking

src/data/roadmaps/scala/content/capture-checking@kbO0eO3UhUzPGaPvZKc_N.md

4.0941 B
Original Source

Capture checking

Capture Checking is an experimental feature in Scala that allows you to track which designated values are captured (i.e., stored as references) by arbitrary other values. This tracking happens at compile time and is currently an opt-in mechanism that can be enabled via an import. Capture checking helps ensure resource safety and prevent capability leakage by verifying at compile-time that capabilities (representing resources, effects, or permissions) are properly managed and do not escape their intended scope.

Visit the following resources to learn more: