If you were to write your own programming language (as I still intend to do someday even if only for the learning experience it provides me), what symbol (or symbols) would you use to represent the assignment operator? Even though it would looks like BNF or old-school Pascal, I would lean towards using := as the assignment operator. That would leave me free to use = for equality and there wouldn't be the issue of = vs. == tripping up new programmers. Besides, performing assignments is more common than making comparisons, so perhaps assignment should have the more distinct operator. Going one step further, if the language I wrote was not strongly typed, I would use == as the identity operator (as like PHP's === ). := and = to == seems a more logical progression to me than = and == to === . I suspect I wouldn't use = as both assignment and comparison as Basic does because of the ambiguity it causes. For example: x = y = 0 Does this mean "assign 0 to ...
The Blog of Timothy Boronczyk - running my mouth off one blog post at a time