2 ms·
If all those functions need all those variables, then you're either going to put them in a class, or put all those variables in something like a dict and just p
by spicyusername 2y ago
If all those functions need all those variables, then you're either going to put them in a class, or put all those variables in something like a dict and just pass that in.
Seeing 10 variables passed in to a function is a code smell.
Whether you put in in a common class / struct or aggregate them in a dict depends on whether or not all those functions are related.
In general, your functions should not be super duper long or super duper intended. Those are also code smells that indicate you have the wrong abstractions.