Skip to main content
20 votes
Accepted

What is the explicit list of the situations that require RAII?

There is no complete list, because many of the most "interesting" examples are application-specific. Consider something like transaction safety in a database server: a transaction must ...
Pseudonym's user avatar
  • 4,991
16 votes

What is the explicit list of the situations that require RAII?

You should basically never write code that requires you to write corresponding code later in the control flow. The obvious examples are resource acquisition things like allocating memory (you have to ...
Matt Timmermans's user avatar
13 votes

What is the explicit list of the situations that require RAII?

There are no things that require RAII to exist, (as evidenced by various languages not having it). RAII helps in avoiding resource management bugs but is not required to solve the resource management ...
ratchet freak's user avatar
4 votes

What do you mean by the ‘computational model’ of a programming language?

The term Computational Model (hereafter, CM) in general (outside the specific context you specified, that is "the CM of the programming language"): In Introduction of theory of comptutation, ...
pber's user avatar
  • 43
3 votes
Accepted

How is a python namespace implemented in terms of memory under Cpython implementation?

Python allows you to inspect the global scope with the globals() function. Let's try it out: ...
Michael Homer's user avatar
  • 13.1k
3 votes

What is the explicit list of the situations that require RAII?

The general notion of resources should be better thought of as a responsibility. An entity acquires a responsibility when it asks some other entity to change its behavior, to the detriment of some ...
supercat's user avatar
  • 1,894

Only top scored, non community-wiki answers of a minimum length are eligible