Hacking with Swift Live 2019 took place on July 8th and 9th, with all profits being donated to SpecialEffect.org.uk. Learn more here: hackingwithswift.com/live You can find Cory on Twitter here: / lukasaoz
КОМЕНТАРІ: 16
@twostraws4 роки тому
Watch next: An Illustrated History of Easter Eggs - ukposts.info/have/v-deo/nnGSpYmpZK-EyZc.html Questions? Comments? Tweet me @twostraws.
@maximusfigueras7074 роки тому
Awesome! very interesting how swift treats value types... i'm pretty new to Mac development in general and really learned something here!
@markuspfeifer84733 роки тому
I actually use a small extension for optionals to mutate them when the underlying value is CoW. It takes an inout closure for the underlying value type and a default value if the optional is nil. If there already is a value (which I find out via a switch statement), I ensure that before applying the inout closure I first set self to nil. After mutating the now uniquely referenced CoW value, I assign the result back to self.
@bmackey4 роки тому
Really liking the styling of the slides, very "Appley"
@MarkBTomlinson4 роки тому
Excellent presentation, intelligent and clearly explained. Code optimisation is so often sacrificed to rapid release cycles. Thank you Cory!
@ChrisOffner2 роки тому
Ha, small world! Curious to see you here Mark. :) Hope you're doing well.
@gjermundification4 роки тому
Will there be a link for the accidental quadratic? Or is it the one on tumblr? Was he referring to a specific blog post?
@markaurelius614 роки тому
That was a good talk, for me at least. I must admit that I didn’t understand that 3 option. Is it explained more carefully somewhere else?
@JacksMacintosh4 роки тому
Am I correct in understanding that this copy-on-write only happens when there's more than one thing pointing to the (lets say,) array? And that if X is the only thing pointing to the array, modifying X won't cause this problem? The talk was great! Thanks Cory for giving it and Paul for putting on the event
@brodigy2544 роки тому
Yes, you understood correctly. I'm suggesting you to take a look at old wwdc talk about value types(probably 2016). In that talk, they implementing CoW manually.
@seccat4 роки тому
Now I really want to know the CoW jokes.
@MrTevelee4 роки тому
Mentions SwiftUI Web @ 12:39
@brodigy2544 роки тому
Really interesting talk, but I feel that it should be at least twice long.
@markcuello5Рік тому
SECURITY
@vuvuzilla2 роки тому
There's a reason why all reliable software in the world is written in C or C++. All these indirections and abstractions you end up having to know about cyclic references, copy on write anomalies and (lack of) compiler optimizations. And the result is unmaintainable code that's impossible to debug if you didn't write the compiler yourself.