← Back
Nick Chapsas June 6, 2025 28s

scoped is now a C# keyword

Summary

The transcript discusses the introduction of scoped dependency injection in C# 12, which provides a language-level mechanism to ensure values do not outlive their caller. It focuses on stack-only types like Span and Ref, offering protection against code that might compile but crash at runtime. The key takeaway is that scoped acts as a "lifetime fence" with compiler-enforced scope safety, preventing accidental memory escapes and improving code reliability.

View original episode ↗