3

Oh god no anything but this

(Seriously now, the reason is a bit complicated because Swift is different but focus on the meme, if you want an explanation I will give it to you in the comments lol)

Comments
  • 1
    Blease exblain
  • 0
    @notThere basically, ObjC (Swift is ObjC but so syntactically sugared that it needs its own compiler) has something called ARC, short for Automatic Reference Counting. Basically, pointers in Swift are happening without you even knowing it, Swift is abstracted to an extreme level from the very beginning, and ARC is the reason why you never call malloc! It allocates stuff automatically when you assign a variable a value that is bigger than the last one. It also knows when a variable is not referenced anymore so only when the root of the data is dismissed, the variable is deallocated. You don’t to worry about memory leaks. But that means that just holding a pointer to something and nothing more is kinda difficult and I never understood and probably will never understand why. Apple kinda stresses to not use them (their classes are literally called UnsafePointer, UnsafeMutablePointer, UnsafeMutableRawPointer and so on and so on).

    Still better than pure ObjC though 😎
  • 1
    Thank you for the explanation. I know shit about swift. Now i know shit and pointers are a fucking meme.

    Thank you for the meme education.
Add Comment