S.O.L.I.D Design Patterns - Unity - Liskov Substitution Principle

preview_player
Показать описание
Just Here To Plug My Social Media Stuff:

Рекомендации по теме
Комментарии
Автор

That was a good example. Thanks! I also learned a peripheral trick from you about printing variables in curly brackets. Thanks for that too!.

judgegroovyman
Автор

Oh awesome. I was already using this without even knowing it was a named principle. Neat.

feidry
Автор

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.

curtiss
Автор

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.

taoge
Автор

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 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?

MQNGameDev
Автор

the dino has crush on another dino aye

sukuneedshelp
Автор

Great. Now I have have clusters of videos in my feed that I cannot watch for days.

TheSerenityVortex
Автор

Huh, I actually did almost the same thing in my game recently... I'm kinda proud now :D

welltypedwitch
Автор

Would making an interface that displays this text make sense? Why/why not?

Thank you for this series, it's super interesting.

Theo-izcj
Автор

They couldn't figure out a better name than "Liskov Substitution"?

alicem
Автор

as i understand it means using polymorphism known from the Objected Oriented Programming, right ?

sarielycera
Автор

What if we use interface instead of abstrat class here? Like open closed principle. I didn't understand the differences

akn