(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 2
K=
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.
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
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.