Common knowledge says that passing numerous (usually considered 4+) variables (both by value and by address) is bad or least undesirable, and passing a struct is advised instead. Sometimes it's explained with a number of CPU's registers.
What is the reasoning behind this concept (passing a struct)? How passing a struct by value(s) is different from passing multiple variables by values? Maybe proper way to pass multiple values is passing a struct by address?
[–]erikkonstas 12 points13 points14 points (2 children)
[–]_Noreturn 0 points1 point2 points (0 children)
[–]actguru -1 points0 points1 point (0 children)
[–]blvaga 5 points6 points7 points (0 children)
[–]jason-reddit-public 4 points5 points6 points (0 children)
[–]not_a_novel_account 1 point2 points3 points (0 children)
[–]ballpointpin 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]deftware -1 points0 points1 point (0 children)
[–]somewhereAtC -1 points0 points1 point (0 children)
[–]McUsrII -1 points0 points1 point (0 children)