为什么Objective-C在Apple社区之外不那么受欢迎? [英] Why is Objective-C not very popular outside of the Apple community?

查看:89
本文介绍了为什么Objective-C在Apple社区之外不那么受欢迎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,包括Mac和iPhone开发人员在内的Apple社区主要使用Objective-C作为其开发语言.但是,似乎没有多少人在Apple社区之外使用Objective-C,例如在Windows或Linux世界中.

I know that the Apple community – including Mac and iPhone developers – mainly use Objective-C for their development language. But it seems that not many people use Objective-C outside of the Apple community, such as in the Windows or Linux worlds.

Objective-C在苹果社区之外不受欢迎的可能原因是什么?

What are the possible reasons that Objective-C is not particularly popular outside of the Apple community?

推荐答案

对此问题的另一种思考方式可能是:为什么C ++而不是Objective-C成为面向对象的C"?

Another way of thinking about this question might be: why did C++, rather than Objective-C, become the "Object-Oriented C"?

我在1991年学习C ++,并记得C ++似乎很热门,而Objective-C是一种奇怪的小语言,没有人(NeXT除外)想要使用.我一直想着记住原因,并且我认为它可以归结为4件事(如果包含C ++并带有AT& T,则可以归结为5):

I learned C++ in 1991, and remember that C++ seemed like the hot thing while Objective-C was this weird little language that no-one (other than NeXT) wanted to use. I've been trying to remember why, and I think it boils down to 4 things (5, if you include C++ having AT&T behind it):

  1. 功能:即使到那时,C ++的功能也比Objective-C丰富得多.
  2. 语法:与C ++相比,Objective-C的语法从C的变化要大得多.
  3. 性能:Stroustrup致力于使C ++功能易于映射到C,因此(理论上!)使用C ++不会造成性能损失.而且,通过明智地使用"inline"关键字,与C相比,C ++可以获得更好的性能.即使到现在,我也无法在对性能至关重要的项目中使用Objective-C.
  4. 样式:相对强而静态的打字是一种时尚(有充分的理由).

因此,与Objective-C相比,90年代初期的C ++为您提供了更多功能,而对性能的影响却更少,并且语法比Objective-C更为时尚和更加熟悉.

So compared to Objective-C, C++ in the early '90s gave you more features with less of a performance penalty, with a syntax that was both fashionable and more familiar than Objective-C's.

这篇关于为什么Objective-C在Apple社区之外不那么受欢迎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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