Re: Value of type '[AnyObject]!' has no member 'Generator'
Re: Value of type '[AnyObject]!' has no member 'Generator'
- Subject: Re: Value of type '[AnyObject]!' has no member 'Generator'
- From: Graham Cox <email@hidden>
- Date: Mon, 05 Oct 2015 10:53:18 +1100
> On 4 Oct 2015, at 11:10 pm, Roland King <email@hidden> wrote:
>
>> A) Ah, so it's Swift continuing to suck.
>
> No, not at all, Swift is being consistently consistent. The variable is a ‘!!’ which means it’s implicitly unwrapped optional of an implicitly unwrapped optional of an array, so when you use it it gets unwrapped for you, once, thus leaving an implicitly unwrapped optional and optionals don’t have generators, you have to re-unwrap it again.
As someone who hasn’t dipped his toe into Swift yet, this sort of thing is a major disincentive. The explanation as to why Swift doesn’t suck doesn’t fit any notion in compuer science that I have ever heard of in almost 40 years of programming. Maybe it’s just the jargon that needs a clearer explantion (I suspect it is), but when things are as clear as mud as this, you are not going to see the adoption rates you want.
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden