> On Oct 9, 2019, at 11:19 AM, Turtle Creek Software via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > Why is Cocoa source code hidden?
Because Apple does not want to expose Cocoa source source. It is proprietary software. > Many of the frustrations we had with the 64-bit update attempt were caused > by Cocoa's lack of visible source. It was a "black box" that often required > trial-and-error to figure out. Yeah, the headers are visible, and Apple has > info online. But sometimes that was not sufficient to understand the actual > implementation details. > > When debugging, the stack trace inside Cocoa was just a bunch of > rarely-helpful Assembly. No way to set breakpoints inside Cocoa classes, or > step through their C code. More mysteries and headaches. I agree reading assembly is horrid. Did you know that you can set a symbolic breakpoint on code inside the Cocoa frameworks? You can also swizzle a framework method to gain insight into what Apple is doing. You can also examine Cocotron source code for insight into what maybe going on behind the scenes. > I personally learned C++ while using the PowerPlant library from > Metrowerks. Its source files were totally exposed. Seeing comments and code > really helped. When designing or debugging, it was possible to step through > their code and see exactly how it functioned. Cocoa would be so much > easier to use if its source was accessible like that. > > In fact, why isn't Cocoa open source? Apple open-sources Swift and the > Darwin kernel. Surely the GUI can't be any riskier to expose to developers? Perhaps Apple does not want to give away the Crown Jewels. --Richard Charles _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com