|
|
|
|
|
by anamax
6473 days ago
|
|
Much of the reason that RAII is such a big deal for C++ is that C++ doesn't help manage resources. The fact that one can free in destructors and that destructors are called automatically in some circumstances is important only if you need to free. That's simply not an issue for many languages. Yes, there are other resources to manage. Python's with and Common Lisp's unwind-protect are both good for open file handles and the like. unwind-protect is better than with and with is better than constructor/destructor because constructor/destructor and to a lesser extent with require too many contortions to use. |
|