çVS C ++(Objective-C的VS的Objective-C ++)的iPhone [英] C vs C++ (Objective-C vs Objective-C++) for iPhone

查看:206
本文介绍了çVS C ++(Objective-C的VS的Objective-C ++)的iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建为iPhone,也可用于其他平台的便携库。

I would like to create a portable library for iPhone, that also could be used for other platforms.

我的问题是休耕:

有谁知道什么是要在iPhone上使用的最好的:Objective-C的目的或-C ++?是否它与C ++相同的方式,Objective-C的C或不?

Does anyone knows what is the best to be used on the iPhone: Objective-C or Objective-C++? Does it works with C++ the same way as Objective-C with C or not?

原因:的Objective-C是C的超集,但目的-C ++ 不是℃的超++

Reasons: Objective-C is a superset of C, but Objective-C++ is not a superset of C++.

在此先感谢!

更新:关于内存使用,速度在同一个执行用例的什么

UPDATE: What about memory usage, speed in the same implementation of an use case?

UPDATE1:如果任何人都可以提供任何更多的信息,他会受到欢迎。

UPDATE1: If anyone can provide any more information, he'll be welcome.

推荐答案

他们没有真正不同的语言。目的-C ++仅仅是Objective-C的与包括C ++ code稍微有限的支持。 Objective-C的是标准的方言,但如果你需要使用C ++的工作,没有理由不使用它。据我所知,最大的实际区别(除了允许使用不同的库)是的Objective-C ++看起来编译慢一点。只是一定要首先读了它,如果你决定走这条路,因为C ++合并和Objective-C是不是100%无缝连接。

They're not really different languages. Objective-C++ is just Objective-C with slightly limited support for including C++ code. Objective-C is the standard dialect, but if you need to work with C++, there's no reason not to use it. AFAIK, the biggest practical difference (aside from allowing use of different libraries) is that Objective-C++ seems to compile a bit slower. Just be sure to read up on it first if you do decide to go that route, because the merging of C++ and Objective-C is not 100% seamless.

这篇关于çVS C ++(Objective-C的VS的Objective-C ++)的iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆