My coding style offor nested function calls is the following:
var result_h1 = H1(b1); var result_h2 = H2(b2); var result_g1 = G1(result_h1, result_h2); var result_g2 = G2(c1); var a = F(result_g1, result_g2); I have recently changed to a department, where the following coding style is very much in use:
var a = F(G1(H1(b1), H2(b2)), G2(c1)); The result of my way of coding is that, in case of a crashing function, Visual Studio can open the corresponding dump and indicate the line, where the problem occurs (I'm especially concerned about access violations).
I fear that, in case of a crash, due to the same problem, programmed in the first way, I won't be able to know which function has caused the crash.
On the other hand, the more processing you put on a line, the more logic you get on one page, which enhances readability.
Is my fear correct or am I missing something, and in general, which is preferred in a commercial environment? Readability or maintainability?
I don't know if it's relevant, but we are working in C++ (STL) /C# C#.