RAII and other languages

This (slightly outdated) article suggests other languages should have better RAII support:

I didn't realize so many languages existed without RAII support. Recently in Java 7 they added the try-with-resource block, which suggests that there was a need or demand for an RAII-like feature, but it's not RAII. In fact in many languages I have investigated there exists minimal support with features that only somewhat resemble RAII.

What do you think about the usefulness of RAII in other languages and the state of support for RAII in other languages?

EDIT: I have also read in other places (http://viming.de/gc_vs_raii.html) that "RAII is something that can only be used with object oriented programming" - I don't think so, can't RAII be supported in functional languages?
Last edited on
Once you have closures, the lifetime of an object may become unpredictable (depending on the language's kind of funargs).

I too find the lack of RAII disturbing, particularly in languages such as Lua which are supposedly geared towards game scripting. Do those people release their deterministic resources manually like savages?
Topic archived. No new replies allowed.