3 ms·
I think that's a great convention. Using = for assignment introduces quite a bit of ambiguity, especially the common typo of "if (x = y)" when "x == y" was the
by silentbicycle 18y ago
I think that's a great convention. Using = for assignment introduces quite a bit of ambiguity, especially the common typo of "if (x = y)" when "x == y" was the intention.
If I ever get around to making a real language (ahem), I will probably use either "<-" for infix assignment (left arrow) or "set" for pre/postfix; "=" will be a value comparison, and "is" will be a pointer comparison (i.e., symbol equality, capable of comparing non-terminating data structures, etc).