-----------------
The number of function parameters should not be too large. Generally, about 6 parameters can be used. Many function parameters will allow readingCodePeople look dizzy at a glance, and it is not conducive to maintenance. If there are many parameters, use the structure to pass the parameters. This is conducive to Data encapsulation andProgramConciseness.
It is also helpful for users who use functions, because if you have a large number of functions, such as 12, the caller can easily make a mistake in the order and number of parameters, and use the structure struct to pass parameters, you can ignore the order of parameters.
Moreover, functions can be easily modified. If you need to add parameters to a function and do not need to change the function interface, you only need to change the structure and internal processing of the function. For programs that call the function, this action is transparent.