News for hackers. Stuff that matters.
Re:Understanding the Objective-C Runtime (2010) by saagarjha on Sunday May 26, 2019 @08:33PM (#20018581)
> A C struct can't forward requests to perform a function onto other targets.

That'd be true if methods were called statically, but with dynamic linking this is no longer the case.

Also, obligatory reminder: much of the interface covered here is runtime implementation–don't mess with it! Some of the stuff mentioned is already outdated.

Re:Understanding the Objective-C Runtime (2010) by fiddlerwoaroof on Sunday May 26, 2019 @09:14PM (#20018730)
A lot of the information here is about the (relatively stable) hooks the objc runtime gives programmers into its internals. If you’re writing ffi code to interact with the objc runtime, a lot of the functions referenced here are reasonable to call directly in the interop layer
Re:Understanding the Objective-C Runtime (2010) by saagarjha on Sunday May 26, 2019 @09:22PM (#20018758)
The functions the the runtime exposes are relatively stable API. It’s the implementation details and structure layouts that are subject to change.
Re:Understanding the Objective-C Runtime (2010) by zapzupnz on Sunday May 26, 2019 @08:54PM (#20018666)
I see the article is from 2010. Is that before or after Objective-C 2.0?
Re:Understanding the Objective-C Runtime (2010) by saagarjha on Sunday May 26, 2019 @09:13PM (#20018721)
Objective-C 2.0 came with 64-bit, IIRC, so 10.6 should be using it.
Re:Understanding the Objective-C Runtime (2010) by armadsen on Sunday May 26, 2019 @09:19PM (#20018747)
Objective-C 2.0 was part of 10.5 in 2007. It’s not directly tied to 64-bit support. You’re thinking of features that require the “modern runtime” which is only available on 64-bit Mac. Those features came after ObjC 2.0.
Re:Understanding the Objective-C Runtime (2010) by saagarjha on Sunday May 26, 2019 @10:40PM (#20019038)
You're right, I mixed those two up. That's a bit too far back for me :)
Re:Understanding the Objective-C Runtime (2010) by gok on Sunday May 26, 2019 @09:40PM (#20018830)
"Objective-C 2.0" was a marketing term for a bunch of features added in 10.5, some big (e.g. nonfragile ivars, garbage collection) others not so big (e.g. for..in loops, synthesized ivars). The language+runtime has evolved tremendously since then without a new marketing name. Generics and ARC were added, garbage collection and vtable dispatch have been removed.