[Swift-devel] New syntax for appending to arrays

Ben Clifford benc at hawaga.org.uk
Tue Jun 28 08:54:01 CDT 2011


> As proposed earlier, a new syntax for appending values to
> arrays have been implemented. Examples are given below.

I think I have been won over to the += syntax.

> Please note that, we still need to make sure that when we can
> only append to an array, so to associate keys and multiple
> values, (i think) we will need two(or more) dimensional arrays.

yes. but there are already multi-dimensional arrays in swift.

also, a one dimensional array should still work, like this:

 int a[];
 a += 232;
 a += 111;

-- 



More information about the Swift-devel mailing list