D versus Objective C Comparison
John Reimer
terminal.node at gmail.com
Sun Feb 1 15:37:32 PST 2009
Hello Chris,
> http://www.fsdev.net/~cmiller/a/20090123_dvobjc.html
>
> Also, I do honor the right of reply. If there's something I have
> written that is now incorrect or inaccurate I will of course change my
> page to reflect that. Heck, all the comparisons in the world are
> worthless if they aren't accurate!
>
> Have a great day, and keep up the good work! I personally can't wait
> until D gets to the point that a (total bonehead) like me can install
> it on OS X! Alas, right now it seemeth to require more brain cells
> than I have at my disposal.
>
Here's a couple comments:
(1) I'm surprised that, in your Objective C introduction, you don't indicate
that the langauge is a direct decendant of Smalltalk. Interestingly you
mention Smalltalk in the D introduction instead, even though the only similarity
between the two is that they both implement a form of OO programming. Objective
C is practically C with embedded Smalltalk. A major purpose for the creation
of Objective C was to bring the benefits and explicit OO style of SmallTalk
to C language developers.
A few sources:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/chapter_1_section_1.html
http://faqs.cs.uu.nl/na-dir/Objective-C/answers.html
And of course, wikipedia (to which you did provide a link):
http://en.wikipedia.org/wiki/Objective-C
(2) The DWT port doesn't support 64-bit platforms (so far as I know), so
I don't understand why this is called a bug. The two ports of SWT that are
currently supported are dwt-win and dwt-linux, both 32-bit versions and dependent
on a 32-compiler (dmd for x86). dwt-mac is still in development by Jacob
Carlborg: this version is compiled with gdc for Mac and is also 32-bit, so
far as I know.
Finally, I agree most with what you say here:
"I stand by my original statement that they're different languages and different
tools for different purposes."
My take on it is this:
Some of Objective C's features are very useful (dynamic OO extensions and
runtime binding); however, I think that Objective-C is really meant to be
a sort of domain specific solution for which the Cocoa development experience
is optimized: the language is purposely simple, which makes it significantly
useful for its intended task. I know Apple recently updated the language
to Objective C 2.0 that added a few more convenience features, but I don't
think they even argue that it's directly competitive with C++ (however, I
cannot verify this). In fact, for those that might need to use other libraries
or use more powerful features only available in C++, there's the option of
developing in Objective C++.
Finally, I don't think Objective-C was intended to be a general-purpose programming
language in the manner of D or C++, so the comparison will fall somewhat
flat there. It's superb for the task for which it was designed (as Smalltalk
was), but then how does one say it is "better "than or even equivalent to
D? If you are a Mac programmer... it's just better because it meets the
requirements of the Mac environment (which has been partially designed around
the language) and includes the tools and API's to improve the experience
on that platform only. It would seem difficult for any language to compete
with that.
-JJR
More information about the Digitalmars-d
mailing list