Quick question about target patforms . . .
Michel Fortin
michel.fortin at michelf.com
Mon Oct 25 17:34:46 PDT 2010
On 2010-10-25 19:51:18 -0400, Walter Bright <newshound2 at digitalmars.com> said:
> Jimmy Cao wrote:
>> I was talking to a guy about D earlier.
>> He said that C++ has too much momentum, whilst D is just standing still.
>> I'm sure if D were to gain this platform, it would be able to gain
>> serious momentum.
>
> I'm curious how C++ deals with Cocoa.
Apple has this Objective-C++ thing, where C++ objects cohabit with
Objective-C object. It's nothing fancy really as both Objective-C and
C++ are extension to C, and there is no overlap in syntax.
class MyCppObject {
int i;
};
@interface MyObjcObject : NSObject {
int i;
}
@end
MyCppObject *cpp = new MyCppObject;
MyObjcObject *objc = [[MyObjcObject alloc] init];
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list