Re: When and how often do you mix C++ with Objective C in your project?
Re: When and how often do you mix C++ with Objective C in your project?
- Subject: Re: When and how often do you mix C++ with Objective C in your project?
- From: Kiel Gillard <email@hidden>
- Date: Fri, 31 Oct 2008 11:18:20 +1100
On 31/10/2008, at 10:33 AM, Boon Chew wrote:
Hi all,
I am a newbie to the cocoa world (PC -> Mac switcher). I have a
fair amount of experience coding in C and C++ and I am just getting
into Obj C now. Right now I am trying to learn the language idioms
and patterns in the Obj C world, specifically, when do you find
yourself mixing C++ code with your Obj C code in your project? How
often do you do that? What's the pros and cons of doing that?
- boon
Welcome to Cocoa with Objective-C!
Any new code I write I always used Objective-C. If I need to mix C++,
it's usually because there is some legacy code that I need to support.
This happens rarely.
I guess some pros are code reuse and enforcing structured/modular
design (for example, I could write my model layer in C++ and write the
controller and view layers in Objective-C using Cocoa). I would
suspect some cons could be slightly slower compile times, inconsistent
coding styles (alternating between similar yet slightly different
languages) and missing out on some of the sweet features of Cocoa that
Objective-C allows it to implement (key value coding, for example).
Kiel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden