Let's say you call a function like this:
someFunc( some_int, some_float, false, "whatever text");
This doesn't look good but if alternatively I pass these by a struct / class, it won't look much better, since I will make up the struct on-the-fly like I do with function parameters.
someFunc( FuncParameters( some_int, some_float, false, "whatever text"));
Even if the struct has the parameter names in it's definition, I don't see those when I call it's constructor.
I can do this instead:
FuncParameters func_parameters;
func_parameters.some_int_data = some_int;
func_parameters.some_float_data = some_float;
func_parameters.some_text_data = "whatever text";
someFunc(func_parameters);
But if I forget the bool-data like above, then nothing will complain about it.
So why do people say that "always pass parameters in structure if there are more than X number of parameters? What am I missing?