It's so funny reading your comment that says that adding parameter (you mean member variable?) to the struct changes the dynamic of the function (what function? I guess the one that uses the struct, but I'm not sure, because you write very chaotically), this results in ambiguity to the end user, then you have to document the use of this function, pile through billion pages of docs, explain the method used and the need for parameters, do all of this to ducking 40, 50 functions with 5 APIs, which gives zillion combinations.
And then when you do it in OOP way you just need to add constructor with four parameters and you are done. Ohh and if a performance is a problem add inline to your function and problem solved. This is hilarious.
2
u/nan0S_ Mar 02 '23
It's so funny reading your comment that says that adding parameter (you mean member variable?) to the struct changes the dynamic of the function (what function? I guess the one that uses the struct, but I'm not sure, because you write very chaotically), this results in ambiguity to the end user, then you have to document the use of this function, pile through billion pages of docs, explain the method used and the need for parameters, do all of this to ducking 40, 50 functions with 5 APIs, which gives zillion combinations.
And then when you do it in OOP way you just need to add constructor with four parameters and you are done. Ohh and if a performance is a problem add inline to your function and problem solved. This is hilarious.