For faster navigation, this Iframe is preloading the Wikiwand page for 里氏替换原则.

里氏替换原则

Portrait of Barbara Liskov
里氏替换原则由芭芭拉·利斯科夫提出,照片摄于2010年.

面向对象的程式设计中,里氏替换原则(Liskov Substitution principle)是对子类型的特别定义。它由芭芭拉·利斯科夫(Barbara Liskov)在1987年在一次会议上名为“数据的抽象与层次”的演说中首先提出。[1]

里氏替换原则的内容可以描述为: “派生类(子类)对象可以在程序中代替其基类(超类)对象。” 以上内容并非利斯科夫的原文,而是译自罗伯特·马丁(Robert Martin)对原文的解读。其原文为:

Let be a property provable about objects of type . Then should be true for objects of type where is a subtype of .

芭芭拉·利斯科夫周以真(Jeannette Wing)在1994年发表论文并提出以上的Liskov代换原则

引用

  1. ^ Liskov, Barbara. Data abstraction and hierarchy. 1987-10-04 [2008-03-23]. (原始内容存档于2019-06-30). 

参考文献

一般参考

具体参考

参阅

外部链接

{{bottomLinkPreText}} {{bottomLinkText}}
里氏替换原则
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?