[Swift-devel] New syntax for appending to arrays

Yadu Nand yadudoc1729 at gmail.com
Wed Jun 29 09:25:42 CDT 2011


> I thought you were already  allowing strings as subscripts?
>
> (as in the example a["foo"] += "bar" )
Yes, but foreach loops don't allow indices to be non-int. I still haven't
fixed that.

> 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.

Yes, when there was no nesting, and appends were done as toplevel-
statements the thread ids were number like "2" , "0" but when I modified the
parser to allow appends to be done inside loop-bodies the thread indices
turned out to be like "0-1-3" , "1-0-3-2-1" etc.. and key collisions are
happening. Wasn't thread prefixes supposed to be unique ?



-- 
Thanks and Regards,
Yadu Nand B



More information about the Swift-devel mailing list