[Swift-devel] New syntax for appending to arrays

Mihael Hategan hategan at mcs.anl.gov
Tue Jun 28 15:48:05 CDT 2011


So far we have:
3, 0, 3, 5, 3, 3, (0, 1, 5)

Anybody else?

On Tue, 2011-06-28 at 14:29 -0500, Mihael Hategan wrote:
> On Tue, 2011-06-28 at 09:08 -0500, Ian Foster wrote:
> > $0,02 from me -- given that Swift has a C-like syntax, this syntax will surely confuse people??
> 
> "+=" is a bit confusing, but then I don't think it's more so than using
> "+" as a string concatenation operator.
> 
> So please vote or propose an alternative:
> 
> 0. a += 1;
> 1. a ++= 1;
> 2. a ++ 1;
> 3. a << 1;
> 4. a[] = 1;
> 5. a .= 1; (that would make more sense if "." meant concatenation in
> swift).
> 
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel





More information about the Swift-devel mailing list