3 ms·
"defer" is effectively used for predictable destruction in Go, and a more automated RAII scheme could be used in its place. C++/CLI is a language that targets
by int_19h 9y ago
"defer" is effectively used for predictable destruction in Go, and a more automated RAII scheme could be used in its place.
C++/CLI is a language that targets a garbage-collected runtime, yet has full-fledged RAII semantics (they're mapped to CLR Dispose pattern).
- mratzloff 9y agoOh, I totally forgot about C++/CLI! You're absolutely right; that's my mistake. I do agree that RAII is preferable.