Once upon a time, both sides of a ~ had to be arrays of the same type, even though ~= allowed the rvalue to be a single element to be apppended to an array.
Now, ~ can also take a single element on one side. For example:
----------
int[] qwert = [ 2, 3, 4, 5, 6 ];
int[] yuiop = qwert ~ 8;
int[] asdfg = 10 ~ yuiop;
----------
However, this capability is not documented, either for ~ or for ~=, as far as I can see.
Comment #1 by matti.niemenmaa+dbugzilla — 2006-12-03T04:09:44Z