Say I have func_a and func_b which both take one argument, and I want to pass the result of func_b to func_a.
What is the most common way to parenthesize this?
func_a func_b inputfunc_a func_b(input)func_a(func_b input)func_a(func_b(input))
You’d have to scan source to find the “most common”.
I try to write what makes sense under the circumstances, but would almost always use either:
If the functions are named things that “sound like” a sentence or phrase, then I’ll drop as many parens as I can.
In other words, if it sounds like something I’d say out loud, I’ll write it like I’d say it–a sentence or phrase.
If it doesn’t sound like something I’d say in real life, needs parens to enhance clarity, etc. then I’ll write it like I’m writing code, because it sounds/looks like code.