What does := mean?
It is borrowed from computer programming: it means that the item on the left hand side is being defined to be what is on the right hand side. For example, $$y := 7x+2$$ means that $y$ is defined to be $7x+2$.
This is different from, say, writing $$1 = \sin^2(\theta) + \cos^2(\theta)$$ where we are saying that the two sides are equal, but we are not defining "1" to be the expression "$\sin^2(\theta) + \cos^2(\theta)$".
Basically, some people think that there should be notational difference between saying "I define blah to be equal to blankety" and saying "blah is equal to blankety". So they use := for the first and = for the latter. Usually, it is clear from context which of the two uses of the equal sign is intended (often because of signal words like "Let", "We define", etc.)
= and == nowadays. I have also seen $\leftarrow$ in the context of formal semantics, but hardly ever $:=$.
– Raphael
Mar 05 '11 at 23:24
= and == dates back only as far as C, which was the first to use = for assignation and == for comparison. := was used in Pascal, among others.
– Arturo Magidin
Mar 06 '11 at 03:03
:= for assignment.
– Arturo Magidin
Mar 06 '11 at 05:02
:=, but not the others. I think it is possible that the language designers of that time where influenced by maths (as has happened a number of times), but := is so far the only easily typable symbol mentioned here, so it is perfectly reasonable to assume it stems from programming languages in the first place. For completeness, I have seen an older TCS-prof (former mathematician) use $=_{df}$ consistently. There might have been an e in there, but not legible.
– Raphael
Mar 06 '11 at 15:36
Pascal as mentioned above, but I am trying to think of any examples of languages proceeding pascal with the same notation. I cannot think of any.
– John Alexiou
Mar 18 '11 at 19:50
I think the Bourbaki used it first.. not sure.. I know physicists use $\equiv$
!= was chosen because it somehow resembled $\ne$ where ! "strikes through" =.
– Ruslan
Nov 18 '14 at 13:28
!= is meant to resemble "$\neq$". Of course, non-coding uses of ~, @, #, %, ^, etc, differ considerably from their coding counterparts; even so, re-purposing "percent" as "modulo" seems somehow less disconcerting than completely inverting the (for lack of a better word) "intrinsic" meaning of !. I wonder what the language designers thought of this; did they just shrug it off? did they relish the irony even a little?
– Blue
Nov 18 '14 at 14:35
? to represent optional (possibly-nil) values, and ! to indicate non-optional (definitely-not-nil!) values. So, there, ! is the symbol for negation and emphasis!(!)
– Blue
Nov 18 '14 at 14:36