• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Value of type '[AnyObject]!' has no member 'Generator'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Value of type '[AnyObject]!' has no member 'Generator'
      • From: Jens Alfke <email@hidden>
References: 
 >Value of type '[AnyObject]!' has no member 'Generator' (From: Rick Mann <email@hidden>)
 >Re: Value of type '[AnyObject]!' has no member 'Generator' (From: Roland King <email@hidden>)
 >Re: Value of type '[AnyObject]!' has no member 'Generator' (From: Rick Mann <email@hidden>)
 >Re: Value of type '[AnyObject]!' has no member 'Generator' (From: Roland King <email@hidden>)

  • Prev by Date: Re: AVMetadataItem key
  • Next by Date: Re: An off-topic question/post that may be worth a short read. (Sorry for the xpost)
  • Previous by thread: Re: Value of type '[AnyObject]!' has no member 'Generator'
  • Next by thread: Re: Value of type '[AnyObject]!' has no member 'Generator'
  • Index(es):
    • Date
    • Thread