Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设计模式七大原则之里氏代换原则(Liskov Substitution Principle) | 浪迹一生 #152

Open
syshlang opened this issue Aug 26, 2019 · 0 comments

Comments

@syshlang
Copy link
Owner

https://www.syshlang.com/64719d09/

    里氏代换原则(LSP:Liskov Substitution Principle)指出:如果对每个类型为T1的对象o1,都有类型为T2的对象o2,使得以T1定义的所有程序P在所有的对象o1都代换成o2时,程序P的行为没有发生变化,那么类型T2是类型T1的子类型。    换句话说,所有引用基类的地方必须能透明地使

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant