Why do we have to call parent overriden functions(Super::)?

For example if I make a new c++ class which inherits AActor and I want to set some default properties with PostInitProperties(), why do I have to call Super::PostInitProperties()?

Because the compiler wouldnt know what exactly you want to do. What if you dont want to call the parent implementation? If the call is implicit, you could never tell it to not call it.

  • Maybe you want to completely change the behaviour of the function and have the super implementation never be called?
  • Or you want to have it called and just add a few properties?

Anyway, this is how inheritance for methods/functions usually work in any modern (and not so modern) OO language, since it gives you most control of the flow.

Hope that clears it up a bit!

Cheers,