On May 20, 2008, at 9:52 PM, Peter Duniho wrote:

Each language varies a bit, of course. But in the other popular languages that I know reasonably well -- C++, C#, Java -- a subclass does not have the ability to touch any part of the base implementation that is not specifically exposed by that implementation. Private members are invisible, and other members are only overridable when the base class allows it by making them virtual.
<snip>
Cocoa restrains class extension _much_ less than any of these other languages, and in turn has a _much_ higher degree of hazard.


The goal is not for every language to mimic C++/C#/Java. Different languages serves different purposes and there is no single best language. Take Adobe Lightroom as an example, almost half of the code (by line count) is written in Lua:

        <http://www.lua.org/wshop05/Hamburg.pdf>

Is this because they don't know how great a static, restrictive, safe, and secure language is? No, it's because they thought that some other language quality was more important.

I think that Objective C finds a pragmatic sweet spot between the performance and interoperability of C, and the dynamism and rapid development qualities of scripting languages. It is small and easy to learn, easy to read and write, and since you rarely have to deal with raw pointers, it also provides many of the benefits of a more pure object environment like Smalltalk/Java/C#.

Most developers that I know of feel more productive in Objective C than using more restrictive languages like C++/C#/Java. You might expect that the same qualities that makes a language good for rapid development also would brings some drawbacks, for example making the code more difficult to read and maintain. However, this is not a problem typically associated with Objective-C.

Finally, also note that the compiler isn't the only, or perhaps even the best, way to achieve productivity and quality - See the discussions on "Strong Typing vs. Strong Testing":

        <http://mindview.net/WebLog/log-0025>


It's certainly a continuum. I agree we're not talking either/or, black/white, etc. here. Other languages aren't without their danger zones either. It just seems to me that Cocoa goes overboard, for relatively little payoff.


Let's agree to re-visit this discussion one to two years from now. I don't think that it's fair of us to expect you to provide an informed comparison before you have more experiences with both environments.

Regards,

j o a r


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to