Home > technical > The LSP

The LSP

Objects of subtypes should behave like those of supertypes if used via supertype methods. – Barbara Liskov

Having learned the “Liskov Substitution Principle” as an object-oriented design aid many years ago, I was delighted to discover this video of Ms. Liskov accepting her Turing award in 2009: Barbara Liskov Lecture Video – A.M. Turing Award Winner.

If you don’t have the time to watch the hour long lecture by this extraordinary lady, but you’re curious to know more about Ms. Liskov, here are my notes:

  • She “accidentally” entered programming.
  • She created the CLU and ARGUS programming languages.
  • Let’s face it, in systems we write programs in C & C++ because efficiency really matters“.
  • She was surprised that her paper on sub-types took off and her name became acronym-ized: “LSP”.
  • She’s not a fan of DSLs or AOP because “readability is more important than writeability“.
  • Abstract types, via encapsulation, were a boon to “reasoning about correctness“: understanding where you are in the code and how you got there.
  • While creating CLU, she didn’t care about inheritance because it breaks encapsulation and makes “reasoning about correctness” more difficult. She simply used composition and called the methods of child objects via delegation.
  • Since she is a practitioner, she stayed away from theoretical work, e.g. polymorphic lambda calculus.

lsp

lsp2

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: