初创公司选择 Swift 而不是 Objective-C 的七个原因 已翻译 100%

oschina 投递于 2017/02/09 11:52 (共 6 段, 翻译完成于 02-10)
阅读 5961
收藏 21
0
加载中

In our last blog, we considered Swift to be one of the most popular mobile app development trends that are going to conquer 2017. And that's quite a fact! If you are a up-to-date with the iOS world, you know that Swift took over Objective-C slowly and smoothly in December 2016.

  • However, many have missed that the trend is going somewhere else. Our researchers at  ValueCoders found that some top notch giants like IBM, LinkedIn, Facebook, Uber, and Mozilla were already involved with Swift. But now, worldwide startups (including the fast-growing ones in Silicon Valley) are focusing on Swift, too.  A study from UpWork shows that Swift is one of the top fastest growing skills for startups and freelancers. 

Before we discuss the reasons, here's some crisp information about Swift's background.

已有 1 人翻译此段
我来翻译

Background of Swift Programming Language

Swift is a programming language from Apple that's characterized as “Objective-C without the C.” It was introduced at WWDC in 2014 and announced as open source in 2015. After it went open-source, IBM and Apple jointly started investing in it. Swift supports iOS, OSX, watchOS, tvOS, and last but not least, Linux. It's had two major version releases to date — Swift 2.0 in September 2015 and Swift 3.0 in September 2016. Now, it is one of the top trending techs on Stack Overflow, passing Objective-C

7 Reasons For Startups To Adopt Swift Over Objective-C

Swift has taken off successfully not only because it’s well-structured and designed, but also because people have supported it. Moreover, independently managed conferences such as the Swift Summit help to enrich the community. Let's see what's there for startups to adopt this language.

已有 1 人翻译此段
我来翻译

1) Open Source and Growing Fast

An open-source programming language makes it immediately accessible as well as less costly for startup companies. According to studies, open source software/languages collectively help business owners save around $60 billion per year.

Swift is available on Linux, and work is being done to bring Swift to Windows. With the support of the open-source community, Swift shows great potential, and it's growing really fast. Until 2014, it was a monopoly for Objective-C to develop native iOS apps, However, Swift has brought an end to that era. Here's a glimpse of the growth

已有 1 人翻译此段
我来翻译

2) Less Time to Market and Easy Coding

One of the biggest challenges for startups is shortening time to market. They need quality products in less time. Swift can help you with that.

With Swift package managers, developers can push their packages to collaborate with others, focus on the logic, and utilize different packages to quickly assemble apps in order to reduce time to market. There are also different repositories of Swift package managers, like IBM Swift Package Catalog, which offer high-quality dependency management and easy coding options.

3) Less Code and Even Less Error Prone

Swift, as a functional programming language, supports passing functions as variables. As a result, you produce highly generic code that can do a lot of amazing things, reducing repetition as well as effort.

On the other hand, on behalf of Swift's predictable behavior, when a null optional variable is used, Swift instantaneously triggers a run-time crash. The crash fuels up the bug-fixing process due to its consistent behavior. Swift forces you to fix the issue right away. This in return, reduces development time.

已有 1 人翻译此段
我来翻译

4) Safer and Easy to Maintain

Safety is a crucial aspect when it comes to mobile applications. In this competitive marketplace, a startup should concentrate on developing a secure app. Moreover, if the app is easy to maintain, then it's a boon indeed.

Swift offers both benefits at a time. Be it the way it handles bugs or calls the pointer variables, it produces safer apps than Objective-C. On the other hand, Swift is much easier to maintain, as it does not have any legacy code to deal with. Objective-C can not evolve until C evolves, but Swift does not have such dependencies, which makes it easier to maintain.

5) Less Costly to Hire Swift Developers

If you want to hire iOS developers to develop native apps, Objective-C and Swift are the only choices. As per a survey from Stack Overflow, Objective-C developers are the highest paid ones, followed by Swift developers. Here's is the list:

Hence, in order to reduce development costs, Swift is much preferable over Objective-C.

6) Swift Has a Bright Future

Swift is a very organized and well-designed programming language from Apple. It is faster than Objective-C, offers unified memory management, and it is intuitive, clean, and expressive, which allows you to express the intent of the code without the language getting in the way.

已有 1 人翻译此段
我来翻译

7) Developers Love It!

One of the most important factors for any programming language is the developers. Developers focus on and embrace modern technologies in order to make the development environment fun and engaging while also making sure their talents don't fade. According to a 2016 study in Stack Overflow, Swift is one of the most-loved languages, receiving votes from 72.1 % of developers. Also, Swift has a large developer community, which makes it more supportive and interesting for startup development.

Bottom Line

In the competitive business environment where time is a deciding factor for startups, it is a major decision to take whether they want to switch to a new programming language. However, if you/ your iOS developers are already using Objective-C, then you have a head-start and don't need to learn an entirely different language.

已有 1 人翻译此段
我来翻译
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接。
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。
加载中

评论(28)

单元测试
单元测试

引用来自“angelboy”的评论

谁特么再说swift天天改我喷死你,没用过没话语权

引用来自“notreami”的评论

年年改
哈哈哈哈哈,66666,没毛病.
yizzuide
yizzuide

引用来自“红薯丸子”的评论

swift4.0有望实现ABI稳定
ABI稳定是底层二进制接口,API稳定才是针对开发者
yizzuide
yizzuide
你们完全没有明白苹果的意图,swift是给其它平台的开发者使用尝鲜的,苹果自己仅用swift写了计算器和Dock这两个应用
烽火云烟
烽火云烟

引用来自“一木四水”的评论

另一方面,说明下 Swift 的可预测行为,当使用 null 可选变量时,Swift 立即触发运行时崩溃。 由于其一致的行为,崩溃加速了错误修复过程。 Swift 迫使你立即解决问题。这反过来,缩短了开发时间。

实在是编不出理由了吗?NULL难道不应该崩溃?
这个真是太胡扯乱凑了。
汉唐
汉唐

引用来自“retozero”的评论

说了半天swift,结论却说使用Object-C有优势,怎么没太看懂啊
文章的意思是:如果你目前是oc开发者,相比其他人,转向swift的时候你更有优势。(因为有oc的基础)
Kooosy
Kooosy

引用来自“angelboy”的评论

谁特么再说swift天天改我喷死你,没用过没话语权
用他开发了一年了, 被坑哭了都。。
大侠王二
大侠王二
有没有用过swiftenv 进行过版本管理
grath
grath

引用来自“angelboy”的评论

谁特么再说swift天天改我喷死你,没用过没话语权
我已经不想回想从swift12->swift22->swift23->swift30 在升级到swift30的时候失败了 现在项目停留在swift23 再也不改了
开源中国首席大脸猫猫
开源中国首席大脸猫猫
初创公司选择像React Native这样的跨平台解决方案
十三哥
十三哥
swift刚出来不久,发了疯的学习,写了个小游戏发布到appstore。感觉swift本身很难用,四不像的杂交语法,背着OC的沉重包袱,写的代码很难编译通过。再也不愿意看swift一眼。
返回顶部
顶部