4 ms·
How often? Quite. "Take these two points and extrapolate." "Solve this quadratic equation." Whether you need more complicated arithmetic expressions depends
by MereInterest 11y ago
How often? Quite. "Take these two points and extrapolate." "Solve this quadratic equation."
Whether you need more complicated arithmetic expressions depends entirely on what field you are working in. I would not call `8+6-(4+5)*7` complicated by any means.
- sklogic 11y agoIs it really that often? More than 10% of lines of code containing nested arithmetic expressions? Sorry, I find it hard to believe.
- MereInterest 11y agoIf 10% is your threshold of "often", then no. Arithmetic expressions do show up often enough in code that I work on that they should be immediately readable.
- sklogic 11y agoNobody is stopping you from keeping them as readable as you like. The question here is in readability of the remaining 90% of the code, and this is exactly where nested expressions are evil and must be flattened.