3 ms·
> I can assure you it's much easier to read complicated formulas in well written code than in conventional math notation! I could not disagree more. The long n
by nemetroid 5y ago
> I can assure you it's much easier to read complicated formulas in well written code than in conventional math notation!
I could not disagree more. The long names obstruct the shapes of the expressions, making it difficult to recognize common concepts visually. There's a higher need for intermediate variables (to avoid expressions becoming physically too long), and the intermediate variable names often need to be very long to properly describe their meaning (and may represent highly abstract concepts). Terser code can avoid trying to name these things that cannot be meaningfully named.
> If you were to use all one letter variable names and cram all computations into a single large expression, that would be considered by most to be poor code. There's a reason why, and it's been proven out in industry.
I agree that it's not a good idea to put everything in a single expression. But it's not a good idea to put every single mathematical expression in its own variable either, and in my experience the sweet spot lies much closer to the terse code.
I've worked with math-heavy code in both terse and verbose styles, and refuse to work on verbose math code again.