4 ms·
I've talked about the x = x + 2 / x == 0 "problems" with a couple of people during university and it seems there's different levels of problems/irritations peop
by kriro 11y ago
I've talked about the x = x + 2 / x == 0 "problems" with a couple of people during university and it seems there's different levels of problems/irritations people have with the syntax. For me it was mostly a "shrug ok so that's that, don't see the problem" when it came to accidentally using "=" instead of "==". A couple of friends seemed to have mental blockades and often wrote code containing the typical bug of "=" instead of "==" (the hotfix of 1 == a instead of a == 1 helped some).
For me the irritating thing was x = x + 2 since it triggered my math brain which protested and simply said...well that can't be, error. So I guess I did have the exact reverse problem always seeing the assignment as an equality.
Thankfully this passes really quickly after you immerse yourself in it for a day.
Of course years later one of the first sentences from our Prolog 101 prof was "so you have been programming for a while now...let me write this down...i = i + 1...someone explain what this does...what would you suppose a (stereotyped) mathematician (that only knows math) would tell me"
Kind of made me smile.
/offtopic_anecdote