Hacker News new | ask | show | jobs
by synergy20 1120 days ago
not an apple fan,from obj-c to swift,why not just c++, NIH plus I-want-to-control-everything?
3 comments

Because C++ is not memory safe, lifetime safe, type safe, has notoriously brittle ABIs, ...?

Seriously if you're going to take the cost of rewriting massive amounts of code, why would you not rewrite it in a language that offers actual improvements to the language that's being rewritten?

Apple already has (and uses) objective-c++, and the majority of objc I've ever interacted with is objc++ once you're outside of headers (just look for .mm extensions).

If you look at C++ and then look at Swift I think you will understand why they didn't make C++ the main language.
Objective-C was not invented at Apple. Hard to see how NIH applies there.