ボローチェッカーとは何か?
ボローチェッカーはコンパイラ内の静的解析で、データへの参照がどのように作られ使われるかを追跡し、任意の数の読み取り専用の借用、または単一の可変な借用のいずれかが同時に存在できることを強制します。また、参照がそれの指すデータより長く生き残らないことも保証します。違反はランタイムのクラッシュではなくコンパイルエラーとして報告されます。
なぜ重要か
ボローチェッカーはgarbage collectorなしで、use-after-freeやdata raceといったバグのクラス全体を防ぎます。その厳格さは、メモリ安全性のエラーを本番のクラッシュからコンパイル時の失敗へと移します。
関連ガイド
What Is Ownership in Memory Management?Ownership is a model where each resource has a single owning variable responsible for freeing it, making clea…
What Is a Lifetime in Reference Types?A lifetime is the span during which a reference is valid, used by the compiler to guarantee a reference never…
What Are Move Semantics?Move semantics transfer ownership of a resource from one object to another without copying, leaving the sourc…