4 ms·
The main difference between math and programming languages is that it's perfectly fine in math to define l-values. For example i^2 = -1 is the generally accept
by contravariant 9y ago
The main difference between math and programming languages is that it's perfectly fine in math to define l-values.
For example i^2 = -1 is the generally accepted definition of the imaginary unit.
- theoh 9y agoIt's r-values that cannot be assigned to. What's really missing from most conventional math, I think, is the notion of conditional expressions based on equality testing. "=" is usually only used in a declarative way, to declare that two expressions are equal. See n+k patterns in Haskell for a programming exception to the rule you mention.
- theoh 9y agoActually, though, set-builder notation can use the equals sign to express a condition. e.g. the examples here https://en.wikipedia.org/wiki/Set-builder_notation https://en.wikipedia.org/wiki/Set-builder_notation. Maybe there are other examples in math.