www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D vs Objective C?

reply Robert Jones <robertjones21 HotPOP.com> writes:
How does D (hold up to/compare with) Objective C?
Jul 26 2004
parent reply Matthias Becker <Matthias_member pathlink.com> writes:
How does D (hold up to/compare with) Objective C?
You can't compare them. Objective C is very different from D. There is a language called Objective C++, which is just a mix of C++ and Objective C. This is possible and usefull as Objective C's class system is so different from that of C++. You don'thave things like the message eating nil, or any that dynamic thing in D.
Jul 27 2004
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"message eating nil"

that sounds like something you wouldn't want to meet in a dark alley.

something i wondered - is objective C a true extension to the compiler or is
it just a fancy preprocessor?  i wonder because the syntax is so weird, and
it would make sense if it were weird for easy preprocessing.
Jul 27 2004
parent Matthias Becker <Matthias_member pathlink.com> writes:
"message eating nil"

that sounds like something you wouldn't want to meet in a dark alley.
Well, nil is something like null. But if you call a message on it, the result is just nil rather than an exception. So you don't need stuff like the null object pattern.
something i wondered - is objective C a true extension to the compiler or is
it just a fancy preprocessor?  i wonder because the syntax is so weird, and
it would make sense if it were weird for easy preprocessing.
I'm not sure. Perhaps at first it was just a preprocessor. The first C++ compilers just compiled to C, too.
Jul 28 2004