What mistake is that? The left hand variable equals the right hand value assigned to it.
Foo = bar and 1 = 1 are equivalent in my mind.
Foo = bar and 1 = 1 are equivalent in my mind.
Depending on which programming language you're using, "foo = bar" can mean either "make foo now equal to what bar is" or "is foo equal to bar now?". Neither one is the same as in mathematics, which is "foo is categorically equal to bar".
Consider:
foo = 1
bar = 2
foo = bar
In mathematics, this would be a logical contradiction, and either you'd realize you made a mistake, or you'd jump back to the step where you said "now assume ..." and say "now we've proven this can't be true".In programming, this is perfectly valid, and means "ok, ignore what I wrote just 2 lines ago, and now make foo equal to 2, also".
You say you think it means "the LH var equals the RH value assigned to it", but you don't say what you think it means to assign to the literal 1.
How do you square that circle, "fine" for assignment; wrong for equality.