|
|
|
|
|
by thetruthseeker1
2994 days ago
|
|
When I learnt programming, i was confused by x=x+1; After I understood what it really meant, I wondered why they didn’t use some other symbol to capture this semantic. Say something like x <- x+1 ; Which implies assignment rather than equality - That way this would be unambiguous and I feel is more clear. I now guess the choice of using ‘=‘ was probably an attempt at making a (compromised) choice given the limited symbols that were available back when High level languages were first written? |
|
https://www.hillelwayne.com/post/equals-as-assignment/
The summary is that C used it because assignment was a lot more common than equality checking, and back then, typing fewer characters was a big deal.