Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Programming languages have settled on '=' for assignment and '==' for equality comparison.

Certainly not all. "=" is a poor choice for assignment as it has a totally different meaning in maths. Algol and Pascal got this right with ":=". Fortran got it wrong here.

> plus '=' is used for assignment in math just as often too

No it's a relational operator in math, so "x = x + 1" does not have the same meaning as assignment to a mutable variable.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: