2 ms·
If someone used clear on a vector of pointers AS RECOMMENDED IN THIS ARTICLE they've just introduced a serious, serious problem. readability < does it work
by trevelyan 15y ago
If someone used clear on a vector of pointers AS RECOMMENDED IN THIS ARTICLE they've just introduced a serious, serious problem.
readability < does it work
- KirinDave 15y ago"readability < does it work" No. In a professional setting, readability ~= does it work. The code presented works almost by accident. It is clear there is no thought put into it at all. It is confusing, and subsequent modifications could cause errors very easily. It is not acceptable code. Of course, code needs to work. Of course, if this .Clear method is a memory leak you wouldn't use it. Of course, we need to consider these things. But there is no situation in which this code is acceptable. This code would not even warrant a passing grade in an "Introduction To Programming" class.
- trevelyan 15y ago> Of course, if this .Clear method is a memory leak you wouldn't use it. Yes. Exactly.