OO frameworks, especially in the C++ world, have usually shipped with source. This is often highly educational and sometimes a life-saver. Until, Apple didn't ship the Cocoa source.
I have to confess up-front that I only have one substantial Cocoa project under my belt (so far). The scars healed a year or so ago.
I haven't had the time recently to do more than gaze wistfully at Apple's sample code (working in MFC is hard when you know the grass is greener) and there are a lot more good books out there than when I was doing Cocoa. There are probably fewer undocumented interfaces as well.
However, I'm still bearing a grudge - where's the damn source code! .
So, why did Apple do it?
Arrogance of NextStep engineers with little respect for the Mac developer culture? I don't really believe this but there weren't many apologies floating around.
Empowerment of Apple internal developers, free to hack the internals as much as they liked? But, hang on a minute, just how empowered are you if you are trying to keep the interfaces compatible so you don't bury your userbase in QuickSand?
Commercial Necessity / Paranoia - don't give away too much?
I've been looking through some old PowerPlant code lately (yes, using ObjectMaster ) and delving deep into MFC source to debug some hairy problems ( shudder ) and it made me remember just how hard it was to achieve similar debugging on my Cocoa project.
Let's just call this a Neutrally Nostalgic posting.
As of Xcode 2.1, Apple's developer tools have shipped with support for writing unit tests in Objective-C, C++, and C....for C++, they used a framework called CPlusTest. What's that? Never heard of it? That's because Apple created it. Apparently none of the multitude of existing frameworks were good enough. So they created their own. And made it closed source.