|
|
|
|
|
by goldfire
4005 days ago
|
|
The rule is saying that a class which does explicit resource management should be doing only resource management and have no other behavior. In other words, only wrapper classes should manage the resource they wrap, and (ideally) no other resource management should exist. That keeps the management work out of the way of other classes. |
|
I mean it's fine if you are competing with Python or something ,but if you actually care about perf this is never going to work. But of course anyone wanting to coin a "Rule of X" doesn't want to see a problem in its full context, they just want to be able to pretend to have a solution well enough that they can at least fool themselves. Etc, etc.