3 ms·
From a "math perspective," the equals sign is a statement, not an expression. It is asserting the state of something. In programming, we're not 'stating' that `
by pyre 10y ago
From a "math perspective," the equals sign is a statement, not an expression. It is asserting the state of something. In programming, we're not 'stating' that `a = b = c = 2`, we are performing an operation to make it happen. This is why in some early languages the assignment operator was `:=` and the comparison operator was `=`.