Objective-C ++支持多好? [英] How well is Objective-C++ supported?

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

问题描述

我一直在学习Objective-C和Cocoa,通过 Hillegass书,它发生在我,我可能会更好地使用Objective-C ++。 Objective-C似乎是开发UI的明确选择,但我有一个非常强大的C ++背景,并希望在C ++中开发应用程序后端,并使用Objective-C ++进行UI集成。
但是我不知道苹果是否会继续开发Objective-C ++,否则会成为一个死胡同。

I've been learning Objective-C and Cocoa by working my way through the Hillegass book and it occurs to me that I might be better off using Objective-C++. Objective-C seems like the clear choice for developing UIs but I have a very strong C++ background and would love to develop application back-ends in C++ and use Objective-C++ to do the UI integration. But I wonder if Apple will keep developing Objective-C++ or will it become a dead end.

有人使用Objective-C ++吗? >

Is anyone out there using Objective-C++?

推荐答案

免责声明:我不为苹果工作或说话,所以这是我的意见:

Disclaimer: I don't work or speak for Apple, so this is my opinion:

我不能代表主要的开发商店,但在我的小组中,我们使用Objective-C ++来集成C ++库,并且你建议在C ++中编写后端。正如@alxp所提到的,跨越语言边界的异常处理等事情是痛苦的,但是通过一点规划,大多数这些痛苦可以避免。对于经验丰富的C ++开发人员,增益可能非常值得痛苦。

I can't speak for the major dev shops, but in my small group, we've used Objective-C++ both for integrating C++ libraries, and as you propose for writing backends in C++. As @alxp mentions, things like exception handling across the language boundary are painful, but with a little planning, most of these pains can be avoided. For experienced C++ devs, the gains can be well worth the pain.

在支持方面,我认为你可以假设在当前状态下的支持不会消失任何时间很快。它是GCC代码库的一部分, Clang 工具链(Apple的下一个编译器工具链)完全支持Objective-C ++。另一方面,没有任何官方保证,苹果将继续发展整合,修复一些疣,例如。

In terms of support, I think you can assume that support in its current state won't go away any time soon. It's part of the GCC code base and the Clang toolchain (Apple's next compiler toolchain) fully supports Objective-C++. On the other hand, there isn't any official guarantee that Apple will continue to develop the integration—fixing some of the warts, for example.

对于当前的项目,我会说如果使用Objective-C ++提供的好处,它是安全的依靠现有的支持,你应该使用它。

For current projects, I would say that if using Objective-C++ provides benefit, it is safe to rely on the existing support and you should use it.

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

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