[Swift-devel] New syntax for appending to arrays

Ben Clifford benc at hawaga.org.uk
Wed Jun 29 09:09:30 CDT 2011


> I've been trying to avoid doing subscript type specification, but
> that isn't going to work. I see that inside nested loops the thread
> prefix is of the form  (number - )* number , so that basically means
> I can't assume its an int and writing a function to generate a number
> from the prefix doesn't look like the right way to go about this.

I thought you were already  allowing strings as subscripts?

(as in the example a["foo"] += "bar" )

Porbably you shoudl treat the thread ID as opaque and only use it in ways 
that rely on two IDs either comparing equal or not. If you hash it in some 
way and used that hashed value, then you're going to end up with obscure 
bugs caused by collisions.


-- 




More information about the Swift-devel mailing list