3 ms·
D takes the spirit of RAII slightly further too in having scope guards as a first class concept. Not as safe as proper RAII but very useful at the site of decl
by mhh__ 6y ago
D takes the spirit of RAII slightly further too in having scope guards as a first class concept.
Not as safe as proper RAII but very useful at the site of declaration to write scope(exit) close(file); or similar
- aldanor 6y agoScope guard in Rust: https://docs.rs/scopeguard https://docs.rs/scopeguard