Timeline for What can go wrong if the Liskov substitution principle is violated?
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 17, 2019 at 3:02 | comment | added | NingW | +1 because I like Apple. | |
Apr 12, 2016 at 12:38 | comment | added | Tulains Córdova | A drastic reduction in the amount of switch statements is a desirable side effect of LSP. As objects can stand for any other object that extends the same interface, no need for special cases to be taken care of. | |
Apr 12, 2016 at 12:33 | comment | added | sara |
I don't get what switch statements have to do with LSP. if you're referring to switching over typeof(someObject) to decide what you're "allowed to do", then sure, but that's another anti-pattern entirely.
|
|
Feb 26, 2014 at 23:17 | comment | added | Magus | And then Apple broke LSP by changing connectors. This answer lives on. | |
Oct 24, 2012 at 15:26 | comment | added | Andres F. | @Thomas I disagree. It's a good analogy. He talks about not breaking expectations, which is what the LSP is about. (though the part about case/switch is a bit weak, I agree) | |
Oct 17, 2012 at 20:12 | comment | added | Thomas Eding | -1: all around bad answer | |
Oct 17, 2012 at 15:53 | history | edited | Tulains Córdova | CC BY-SA 3.0 |
added 125 characters in body
|
Oct 17, 2012 at 15:47 | history | edited | Tulains Córdova | CC BY-SA 3.0 |
added 125 characters in body
|
Oct 17, 2012 at 15:39 | history | answered | Tulains Córdova | CC BY-SA 3.0 |