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

Equals sign in mathematics is overloaded:

"In mathematics, the equals sign can be used as a simple statement of fact in a specific case (x = 2), or to create definitions (let x = 2), conditional statements (if x = 2, then...), or to express a universal equivalence (x + 1)2 = x2 + 2x + 1."

In most programming languages, the equals sign is reserved only for definition.

If you wanted to be explicit about this in maths, you can use := and I think that notation would solve a lot of beginner and early programmer problems.



Not even definition, but "assignment". Definitions do not change.




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

Search: