3 ms·
"x = x + 1" The reason this does not work in mathematics is because the programming use `=' and mathematical use of `=' are completely different. In programing
by newt0311 18y ago
"x = x + 1"
The reason this does not work in mathematics is because the programming use `=' and mathematical use of `=' are completely different. In programing, `=' implies set which really has no meaning in mathematics as mathematics is only concerned about declaring facts which is what the mathematical `=' does. It declares a fact that the indeterminate "x" is equivalent to some value "y."
- 13ren 18y agoso, assuming the declared fact "x = y", whenever you see "x" you could substitute "y" (and vice versa), and it would make no difference whatsoever? You don't have to worry about whether it is defined yet, or if it has been changed, or if it is really a copy (not a reference/pointer). I intuitively think in terms of an execution model, so this is hard for me (even though it's actually less complex with less to worry about). Thinking of it as "declarative" seems helpful, thanks...
- newt0311 18y ago"so, assuming the declared fact "x = y", whenever you see "x" you could substitute "y" (and vice versa), and it would make no difference whatsoever?" In mathematics, yes. That is the entire point of the '=' statement.