Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Will Swift be an ISO or ANSI standard?

Consider that while Objective-C is open source, Objective-C 2.0 was produced without any effort at all at standardization.

I attended the 2008 WWDC. One of Apple's engineers was demonstrating Objective-C++ and actually said "You can freely mix objective-c and c++." I wanted to start screaming, maybe beat him senseless.

I've done quite a lot of Objective-C, and quite a lot of C++ but I'm still not sure I can figure out how to mix the two.



> I've done quite a lot of Objective-C, and quite a lot of C++ but I'm still not sure I can figure out how to mix the two.

By using Objective-C++. Just name your source file with the .mm extension and Xcode automatically starts compiling it as Obj-C++. If you take Objective-C, remove all the C from it, and take what's left and slap that on C++, that's Objective-C++. And it really does work, and prior to Swift's announcement I thought it was the best approach to doing Cocoa development (because with ARC you can even put Obj-C objects into C++ data structures and do fun things like `std::vector<std::tuple(id,CGRect,NSInteger)>`).


Are you drunk?




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: