|
(I assume this was inspired by https://news.ycombinator.com/item?id=16803874) The use of ‘=’ for assignment in programming languages comes, not directly from mathematics, but indirectly from the use of mathematics in science and engineering. As an example, consider the formula for kinetic energy, commonly written 𝑚𝑣²
𝐾 = ───
2
Why isn't it written 2K=mv², which expresses the same mathematical equality in a smaller, simpler form? Or any of the other equivalent rearrangements? It's because formulas have a convention, where the LHS is a single term naming the value you want, and the RHS contains the terms for values you have. That is, a formula doesn't just state an equality, it states a method for calculating something. That usage predates programming, and was explicitly copied by early programming languages like For[mula]tran[slator] that were designed for scientific & engineering calculations. |
Sure, algebra was fine, a(x+y)=ax+ay can go either way; but not ratios and other relationships.
What helped me was was geometry, where you can see it's just a relationship. All the components move together; one part isn't priviledged as the result.
e.g. you enlarge a circle. It doesn't make sense to ask whether the radius made the circumference bigger, or the circumference made the radius bigger.