I have noticed the amount of Super::function calls that have to be made in certain cases to avoid assert calls later on.
For example forgetting:
Component::InitializeComponent must call its parent from the function body to work correctly.
Notice that this is an anti-pattern: Call super - Wikipedia
And is not a just an anti-pattern for no reason.
As a programmer you do not expect to have to call the parent class member.
Programmers in general (i suppose) are not used to have to do this, therefore forgetting it is easy. It is just not a habbit.
Furthermore.
Why is input handling so over-complicated?
In order to see if a key is pressed, one needs at least 2 function bindings.
One function to handle both pressed and released cannot be done…? Why?
So suppose I want to see if a key ‘A’ is pressed.
I have to bind on Pressed, set a boolean.
Bind on Released. Flip the boolean.
Set a boolean in the constructor to make the class tickable.
Override the Update function and check the boolean state.
Do this for the arrow keys alone requires 4 booleans or an array of 4 with 8 function bindings…Why?
I cannot see how this can be set up more combersome.
Some of those patterns in the code base were laid out almost twenty years ago when OOP was nothing more but C with classes and nobody could foresee the impact they may have today. Now that the pitfalls of object-oriented programming are better understood and many useful patterns and best practices have been established, it is, of course, easier to spot those issues than to refactor them in two million lines of battle tested code that is in active use by thousands of programmers.
My recommendation is to accept these existing idiosyncrasies in the code base as ‘unrealisms’ and to not repeat them in any newly written code, if possible. That is for the most part the convention we follow, and over time we gradually improve legacy code to keep up with modern principles.
In regards to the input API, I don’t believe this is the case. I have bound most of my input functionality to one single function that flips the boolean state of a variable. I am using IE_Pressed, IE_Released input events.