Re: Some non-obvious Swift goodies
Re: Some non-obvious Swift goodies
- Subject: Re: Some non-obvious Swift goodies
- From: Tim Carpenter <email@hidden>
- Date: Sat, 07 Jun 2014 08:22:11 +0800
Also known as lazy evaluation.
Just because you are passing a function, does not mean the receiver will always want to know the answer.
Tim
Sent from my Nokia 6310i
> On 6 Jun, 2014, at 5:52, Scott Ribe <email@hidden> wrote:
>
>> On Jun 5, 2014, at 3:00 PM, Jens Alfke <email@hidden> wrote:
>>
>> Deferred evaluation does look extremely powerful, but I can imagine it’s also potentially very dangerous if misused, in that it can make the semantics of the calling code very non-obvious.
>
> Yes. Note that the feature comes from functional languages, where it does NOT have the problems you brought up, because the deferred functions do not have side effects.
>
> --
> Scott Ribe
> email@hidden
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden