• 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: Possible to defer initialization of let variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible to defer initialization of let variable?


  • Subject: Re: Possible to defer initialization of let variable?
  • From: Rick Mann <email@hidden>
  • Date: Tue, 07 Jul 2015 01:51:13 -0700

> On Jul 7, 2015, at 01:49 , Quincey Morris <email@hidden> wrote:
>
> On Jul 7, 2015, at 01:39 , Rick Mann <email@hidden> wrote:
>>
>> The problem arises when you want to initialize more than one variable in that block of work.
>
> If you ask the wrong question, you get a wrong answer. :)

Whether or not it was the wrong question is debatable.

> You can use a tuple:

Unfortunately, that requires you to have the values all ready at once. Thanks for trying, but I think there's no good way to do this. Best is to just deal with var. Or do the hacky thing you suggested earlier, with local vars that get assigned at the very end to their lets.

--
Rick Mann
email@hidden



_______________________________________________

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


References: 
 >Possible to defer initialization of let variable? (From: Rick Mann <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Quincey Morris <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Rick Mann <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Quincey Morris <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Rick Mann <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Quincey Morris <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Rick Mann <email@hidden>)
 >Re: Possible to defer initialization of let variable? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Possible to defer initialization of let variable?
  • Next by Date: Re: Swift Enums and CoreData
  • Previous by thread: Re: Possible to defer initialization of let variable?
  • Next by thread: Re: Possible to defer initialization of let variable?
  • Index(es):
    • Date
    • Thread