Re: Swift: what is the difference between properties and functions?
Re: Swift: what is the difference between properties and functions?
- Subject: Re: Swift: what is the difference between properties and functions?
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sat, 02 Aug 2014 11:33:42 +0700
On 2 Aug 2014, at 01:10, Quincey Morris <email@hidden> wrote:
> On Aug 1, 2014, at 10:00 , William Squires <email@hidden> wrote:
>
> 2. The method is a closure, but the property isn’t. (For example, for use with Array’s ‘map’ method.)
Let me paraphrase this to make sure I understand it correctly:
let temp1 = w.temperature
let forca1 = w.forecast
println("temperature \(temp1) forecast \(forca1())") // A
someFunctionWithCallback() { println("temperature \(temp1) forecast \(forca1())") }
The call-back will print the same temperature as A, but might print a different forecast. Correct?
Gerriet.
_______________________________________________
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