@dabeaz
Wikipedia says that RAII was invented by the same guy who invented C++, so ¯_(ツ)_/¯
I think it's "computers are good at keeping track of things, especially if you help them a bit (e.g., with the 'with' statement) and people are terrible at keeping track of things, so let's repurpose one thing (lifetimes of variables) as another thing (resource allocation)".
Add comment