Comment on Perhaps Rust Needs "Defer"parentComments−bsder1yWhat we want everywhere is block-scoped defer, right?Not always. Block-scoped defer makes allocating inside "if blocks" a pain.The flip side is that function-scoped is a pain to implement in a non-GC language.
Comments
Not always. Block-scoped defer makes allocating inside "if blocks" a pain.
The flip side is that function-scoped is a pain to implement in a non-GC language.