This misses the main point of LSP, this is an example of OCP. LSP is mainly meant to uncover poor uses of inheritance. Research the "Circle-Eclipse / Square-Rectangle" problems to see examples of what LSP solves. Sorry, not trying to be rude to you man but for correctness, people should know. I appreciate this video series as it's been a very helpful jumping off point for researching into SOLID.
Great video. One question though: In your example of using an ItemLogger, wouldn't it be the responsibility of the ItemLogger to Debug.Log the data and just fetch the appropriate data to log from the Item? IE Debug.Log(Item.GetDisplayText()); This way if we decided later down the road to log to a text file, we don't need to open all the item classes and change them?
This is not a correct representation of the LSP, the principle stated that object of the parent class should be replaceable by object of the child class without breaking the code. I'm not hating, I do like your videos but you're spreading the wrong information.
That was a good example. Thanks! I also learned a peripheral trick from you about printing variables in curly brackets. Thanks for that too!.
One of the best parts about learning new little tricks is being able to show them off to my viewers :D
Oh awesome. I was already using this without even knowing it was a named principle. Neat.
Neato
This misses the main point of LSP, this is an example of OCP. LSP is mainly meant to uncover poor uses of inheritance.
Research the "Circle-Eclipse / Square-Rectangle" problems to see examples of what LSP solves.
Sorry, not trying to be rude to you man but for correctness, people should know. I appreciate this video series as it's been a very helpful jumping off point for researching into SOLID.
Yes I agree. I was going through the video and realized this is an example of the open and close principle not the Liskov substitution.
6:05 - Nice wallpaper.
Great video. One question though: In your example of using an ItemLogger, wouldn't it be the responsibility of the ItemLogger to Debug.Log the data and just fetch the appropriate data to log from the Item? IE Debug.Log(Item.GetDisplayText()); This way if we decided later down the road to log to a text file, we don't need to open all the item classes and change them?
the dino has crush on another dino aye
Great. Now I have have clusters of videos in my feed that I cannot watch for days.
Welp now they are all available :)
Would making an interface that displays this text make sense? Why/why not?
Thank you for this series, it's super interesting.
Great video!
Awsum stuff!
Awsum you!
Huh, I actually did almost the same thing in my game recently... I'm kinda proud now :D
I'm proud of you too :D
What if we use interface instead of abstrat class here? Like open closed principle. I didn't understand the differences
as i understand it means using polymorphism known from the Objected Oriented Programming , right ?
They couldn't figure out a better name than "Liskov Substitution"?
This is not a correct representation of the LSP, the principle stated that object of the parent class should be replaceable by object of the child class without breaking the code.
I'm not hating, I do like your videos but you're spreading the wrong information.
can u make a ragdoll???
what?