Re: Objective-C or Objective-C++
Re: Objective-C or Objective-C++
- Subject: Re: Objective-C or Objective-C++
- From: Charlton Wilbur <email@hidden>
- Date: Fri, 3 Feb 2006 14:48:22 -0500
On Feb 3, 2006, at 9:55 AM, John Stiles wrote:
A lot of people use C++ for their cross-platform app logic, and Obj-
C for their GUI. Obviously, when the two halves meet, Obj-C++ comes
into play :) It's been a joy for me... I can write app logic using
my preferred language, and GUI code using Apple's preferred
language, and the app runs great. I haven't seen any compile-time
or run-time penalty; the generated C++ code looks the same as
always, and the generated Obj-C code looks the same too. If you are
fluent in the languages, and you use an ounce of common sense, it's
as clean and well-factored as any language.
What have you got against mixing the two?
I'm not the original poster, but I'd say that the problem is when you
mix them pointlessly, or use them all because you can. Part of this
may be that my first programming job was maintaining some "C++" code
written by a very bad coder -- the only features of C++ that he used
were the ones that allowed him to be lazy -- declaring variables
wherever, using // comments, having different functions with
different purposes with the same name and different arguments. It
was horrifically bad, and probably accounts for a lot of my avoidance
of C++ since. (Of course, there were other things in his code not
related to C++ -- an apparent violent allergy to variable names
longer than three characters, for instance.)
If you're mixing C++ and Objective-C because it gains you something
you wouldn't have had otherwise -- and the example you offer is a
good one -- then I have no objection. It's when you mix them simply
because you can that I object. And then, if I'm not maintaining the
code, I really have no grounds to object anyway.
Charlton
--
Charlton Wilbur
email@hidden
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden