Interfaces vs Abstract Classes / Inheritance | Programming concept overview

preview_player
Показать описание
Video Content:
----------------------------------
0:00 - Intro
1:12 - Pseudocode Problem
2:39 - Inheritance Solution
4:21 - Interface Solution
5:36 - Differences
6:08 - Polymorphism
6:50 - Unity Example
10:51 - Abstract Functions
11:59 - Outro
------

While still learning and working in Godot, I decided to scratch this topic of my bucket list of programming topics.

In this video I discuss the differences between interfaces and inheritance, and when I would use one over the other. The first part of the video explains those concepts with pseudocode-examples

The second part of the video focuses on a real unity3d game project and why certain classes use inheritance and why others use interfaces.

In talking about these differences I didn't mention the specifics of that project enough I feel, the link for the GitHub link so you can download and look through it yourself is down below. I might make another video just to go through it in more detail

I hope you learned something or gained some insight, thank you for watching!

Link to the unity-project:

You can buy me a coffee to make me code faster at:

#csharp #unity #coding #learning #net #interfaces #abstract #inheritance #gamedev #gamedevelopment
Рекомендации по теме
Комментарии
Автор

This video deserves WAY MORE VIEWS. This is one of the best explanations for anything coding I've seen! WELL DONE

mirmn
Автор

This is a Hiddem gem, thanks for the effort into making this video

TioYoh
Автор

Great explanations. I've used both but still confusing to explain. 5:36 mark was what I needed, the differences.

BVInAZ
Автор

i feel like i learned a bunch while i also learned nothing..

my head hurts… too much word..

good video though! This is probably the best way to explain abstract vs interface

ClaireTheGameDeveloper
Автор

I am not a GODOT developer. Hell i am not even a game developer. But this was really helpful to clear my thoughts about abstract and virtual functions :-)

omegakiller
Автор

Thank you for the well made and explained video!

justinspearlord
Автор

Thank you so much for your video. You have a really good understanding and implementation of inheritance. Nowaday people generally prefer composition (interface) over inheritance because so many mistakes where done with it. Some new language like Go and Rust got rid of inheritance because of that. But a thoughtful usage of it can help in code reuse

Also a big thanks for explaining the difference between abstract methods and virtual function ! (I suscribed by the way)

fabricehategekimana
Автор

Lol, props for the IYeetable and FoxSounds. 😂😂😂

MarushiaDark
Автор

Great video! I love the video style, how do you make those code animations?

TotallyNotZoid
Автор

Excellent video, earned a like and subscribe for "iYeetable" 😂

djpersonalspace
Автор

thank you dude. I was wondering, what the difference between having an interface like IMakeSound MakeSound()
and a TypeOfSound abstract class with an abstract Method MakeASound() that have multiple override MakeASound Child like CatSound : TypeOfSound, GongSound : TypeOfSound that would be referenced in the calss like :

public Class Cat : {
public TypeOfSound mySound
initialization{
mySound = getComponent<CatSound>()
}

etistyle
Автор

Great and informative video thanks for sharing this and keep it up bro👏

AbdullahGameDev
visit shbcf.ru