Re:Translating math into code with examples in Java, Racket,...
by plv7 on Tuesday May 28, 2019 @12:57PM
(#20031972)
Single letter variables (including Greek ones) are great when they stand for something, or are well-known so they don't need to stand for anything.
If you stick to convention and use stuff like A for array, i for index, r for root, δ for small change (a delta), ε for error, Σ (Greek S) for sum, Π (Greek P) for product, etc.
It's only when you start using variable names as if they were free variables when they really aren't that you get into trouble with comprehension, especially from people not in your field.
If you stick to convention and use stuff like A for array, i for index, r for root, δ for small change (a delta), ε for error, Σ (Greek S) for sum, Π (Greek P) for product, etc.
It's only when you start using variable names as if they were free variables when they really aren't that you get into trouble with comprehension, especially from people not in your field.