2 ms·
This touches on a semantic point which confuses many new programming students: in algebra, the "=" is a specification of truth; in programming, the "=" is an op
by ctdonath 13y ago
This touches on a semantic point which confuses many new programming students: in algebra, the "=" is a specification of truth; in programming, the "=" is an operation of assignment. There is a difference, as in "2 * x = x + x", which is perfectly sensible in the former but pointless/absurd in the latter context. Also, "x = 2" in algebra is the notion of "when it is true that x is the same as 2, other truths occur", a different notion than "store value 2 in variable x, then see what the consequences of other operations are." Alas, the nuance is hard to grok until much later in learning both.
- mercutio2 13y agoNit: not "in programming". I would replace that with "when programming in languages with c-style syntax". If only pascal had won that particular syntax battle.