[swift-users] Understanding pass-by-value
Rien
Rien at Balancingrock.nl
Fri Nov 4 12:12:29 CDT 2016
> On 04 Nov 2016, at 17:48, Ryan Lovelett <ryan at lovelett.me> wrote:
>
>> I often end up “printing” the addresses or using GDB to take an inside
>> look.
>
> That is a really simple interrogation technique I wish I had thought of
> that! Thank you!
>
>> One thing that tripped me up: if you use inout variables, the observers
>> will be triggered once the function completes. Even if the function never
>> changed the data referred to. (This is now documented behaviour)
>
> Could you provide a link to such documentation? I think that would be
> interesting to read.
https://developer.apple.com/library/prerelease/content/documentation/Swift/Conceptual/Swift_Programming_Language/Properties.html#//apple_ref/doc/uid/TP40014097-CH14-ID254
Check the last ‘note’ in the Property Observer section.
You can also follow the link in there for more.
Regards,
Rien
Site: http://balancingrock.nl
Blog: http://swiftrien.blogspot.com
Github: http://github.com/Swiftrien
Project: http://swiftfire.nl
More information about the swift-users
mailing list