4 ms·
> I'm absolutely in love with C++'s RAII scheme but it seems almost no languages use it RAII is but one resource-management strategy, and one intrinsically lin
by masklinn 12y ago
> I'm absolutely in love with C++'s RAII scheme but it seems almost no languages use it
RAII is but one resource-management strategy, and one intrinsically linked to C++'s memory model. But if that's what you're looking for, Rust uses the same: http://doc.rust-lang.org/std/ops/trait.Drop.html http://doc.rust-lang.org/std/ops/trait.Drop.html
And in the absence of cycles, refcounted implementations have similar properties (although of course that assumption will break with alternate non-refcounted implementations if refcounting is not part of the language semantics).
> I want to like GO but a language that targets native development but still uses garbage collection just seems like an odd pairing to me.
Not that rare. OCaml is native and GC'd, so is D, or most lisps with native compilers. Hell, Boehm's GC exists.
- Cyther606 12y agoWith Nimrod, you can manage your own memory, or use the GC (Boehm iirc) http://nimrod-lang.org/manual.html#reference-and-pointer-types http://nimrod-lang.org/manual.html#reference-and-pointer-typ...
- dom96 12y agoIndeed, and Nimrod's own GC is actually soft real-time (http://build.nimrod-lang.org/docs/gc.html http://build.nimrod-lang.org/docs/gc.html) with hard real-time already in the works.