Re:C++ Has Become More Pythonic (2014)
by pjmlp on Sunday May 01, 2016 @08:17AM
(#11605894)
> With respect to RAII, I think the main benefit isn't cache-friendliness, but rather deterministic destruction - you can't delay relinquishing a scarce resource that someone else might want to use.
I never said it was related to it, I said it was the other feature many think it is C++ specific, or introduced via C++.
Ada also has RAII via controlled types and Object Pascal also had destructors when it was introduced.
Functional programming languages that allow for rich macros, support trailing lambdas or currying also allow for RAII like implementations using those features.
I never said it was related to it, I said it was the other feature many think it is C++ specific, or introduced via C++.
Ada also has RAII via controlled types and Object Pascal also had destructors when it was introduced.
Functional programming languages that allow for rich macros, support trailing lambdas or currying also allow for RAII like implementations using those features.
For example, with-open-file in Common Lisp.