Classes
摘要
Classes may be useful at times, but they are also among the most misused constructs in modern software engineering. Classes are frequently too long and, therefore, hard to understand. While it is widely understood that global variables should be avoided, the member variables of a class often behave like mini-globals, accessible throughout the entire class. This practice is only justifiable if the class is very short; otherwise, the member variables serve no better purpose than global variables.