Comment by donatj
Comment by donatj 4 hours ago
> X equals X plus one? That’s not math. That’s a lie.
That's really interesting... My wife, who has no real mathematical background had the EXACT same reaction when I was trying to teach her some simple programming. I tried to explain that equals in that context was more of a storage operator than a statement that said line is true. She found it very frustrating and we gave up on the endeavor shortly thereafter.
I've personally always had a soft spot for languages like TI-BASIC that use a storage operator rather than overloading = so for example:
X + 1 -> X
I wonder if I should try a functional language with her.
Mutation should be an advanced topic in programming teaching. Even in procedural languages. It should be seen as an optimization technique you only use when analysis has shown that to be the only way to solve a difficult bottleneck. Using mutation as a basic tool in programming was a mistake.