为什么谷歌不使用Golang或Python作为Android的编程语言?

huangapple go评论109阅读模式
英文:

Why doesn't Google use Golang or python as the language for android?

问题

尽管Go语言有很多优点,为什么Google没有逐步将Android从Java迁移到Go,或者给开发者选择的机会呢?

英文:

While go language has so many good advantages,why Google didn't migrant Android from java step by step to Go,or give the choice to developers?

答案1

得分: 8

Python在一般任务中并不那么快,并且在基于GUI的应用程序中使用也不多。而且,清晰和封闭的API定义并不是该语言的优势。

当谷歌后来收购了制作Android操作系统的公司时,Go语言甚至还不存在。它没有沙箱模型,这似乎是当今一个重要的要求。

当时,具有沙箱和快速性的Java语言是一个非常合理的选择。如今,众多的Java开发人员仍然使其成为相对未知的Go语言之外的更好选择。谷歌一开始就非常希望有很多开发人员制作应用程序(他们甚至分发了许多免费设备),因此使用一种未知的语言是没有意义的。

请注意,Go社区始终有要求在Android上使用Go语言的请求,但提供所有请求的API并不是一项轻松的任务,而且谷歌从未公开承诺尝试去做到这一点。

英文:

Python isn't that fast for general tasks and isn't so much used for gui based applications. And clear and closed API definition isn't a strength of the language.

Go language didn't even exist when the company Google later bought made the Android OS. It doesn't have a sandboxing model which seems to be an important requirement today.

The sandboxed and fast java language made a very reasonable choice at that time. The big number of java coders would still today make it a better choice than the relatively unknown Go language as platform first choice. Google was very interested from the start to have many coders making app (they even distributed many free devices) so using an unknown language would have made no sense.

Note that there always are requests coming from the Go community asking for the Go language on Android but providing all requested API wouldn't be a light task and Google never publicly promised to try to do it.

答案2

得分: 5

给开发者选择的机会总是很好,但使用Java作为标准而不是像Go这样的新语言的原因是,Java的使用范围更广泛(远远超过其他语言),这意味着他们的应用市场将以更快的速度扩展,从而获得更快的投资回报。

英文:

Giving a choice to developers is always nice, but the reason behind using java as the standard instead of a new language like Go, is that java is more widely used (by far) meaning their app market would expand at a much faster rate; yielding a faster return on investment.

huangapple
  • 本文由 发表于 2012年8月20日 14:49:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/12033309.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定