[Swift-user] what is wrong with restart5.swift?

Ben Clifford benc at hawaga.org.uk
Sun May 25 13:03:34 CDT 2008


On Sun, 25 May 2008, Mihael Hategan wrote:

> However, I do have a question. Given that such a usage scenario is not 
> uncommon, how come we've never seen this before?

I'm not sure how common two foreach loops in a row are in real usage. I 
think I'd tend to fold the two loops into a single block if I was doing 
something for real.

Brief playing about seems to suggest it happens with foreach loops where 
the input array is generated over time but not from a range specification 
eg [1:100] or from an input dataset.

Plus it might be a regression.

-- 



More information about the Swift-user mailing list