如果在某一部分中,一个抽象了的类必须向下转换为特定的子类,那么你就没有遵循开闭原则。
If a class that uses an abstraction has to downcast to a specific subclass in one section, you're not following the Open Closed Principle.
由于这个原则,你几乎没有任何限制去达到想要达到的目标。
也许你现在在想,我有没有遵循这些原则,并且在大多数情况下,我的回答是什么呢?
Now you might be wondering if I follow all these guidelines myself, and the answer is most of the time.
应用推荐