Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@olback yes. Basically, Apple thinks that pointers can pose a security threat if used maliciously so they made it extremely hard to use pointers. You barely need it in day-to-day Swift life though.
-
@RememberMe I know, but sometimes when you must use pointers to propagate changes from view controller to view controller it gets stupidly difficult because you have to mess around with UnsafeMutablePointer. If that value is nullable then you must mess around with UnsafeMutableRawPointer. They made it really hard...
-
@OmerFlame wtf? Stop using pointers to propagate changes. You have so many mechanisms to pick from:
Closures, delegation pattern, notification center, Combine.
Heck... you can even use KVO. Still better than abusing pointers.
You know about keypaths, right? I feel like they can be used instead of what you are doing with pointers. -
@OmerFlame everything is basically using pointers under the hood. That’s abstraction ^^
Related Rants
Pointers in Swift.
Nuff said.
rant
swift
wk239
pointers