For Apple developers, we have entered the "Swift era". Although the programming language Objective C is well-loved, its days as Apple's mainstream programming language are numbered. With the end of the WWDC developer conference, Swift is about to take its place and become the new favorite of Apple's new iOS8 and OS X Yosemite. At the WWDC 2014 conference, when Swift was officially announced, sighs and exclamations were heard one after another. But don't worry too much, Objective-C and Swift can coexist in the same application. VentureBeats reporters interviewed well-known software engineer Sam Soffes to understand Swift in the eyes of programmers. Soffes has created applications such as "Litely", "Hipstamatic", and "Bible". 1. Why would developers learn another language? The main goal of Apple's Swift language is to be simple and easy to learn, convenient and efficient to use. Apple is not forcing everyone to learn a new language. In the past, whenever they introduced some big technological changes (like Automatic Reference Counting), they would give developers some time to let people continue to follow the old ways until one day, they themselves wanted to embrace the new technology. But it is not easy to abandon everything you are used to and switch to learning something completely new. For many developers, Objective-C is their livelihood and their jobs. It sounds very difficult to abandon the tools we have become accustomed to in the past few years. However, Apple always has a way to lead people in the preset direction. Apple's killer feature this time is speed. Swift is very easy to use, which is a huge win in itself. The new syntax is also great. I think Objective-C developers will soon like Swift. 2. Objective C is not efficient enough? Objective C is a very great language, it is even older than the Internet. However, this programming language that has contributed to Apple for a long time is not easy to get started, especially for those who are new to programming. The main reason for the difficulty in learning is that Objective C looks very different from other C-based languages. The most annoying thing about it is that it is a thin layer on top of C. It is difficult to build something easy to learn and efficient based on a low-level language like C. You need to do a lot of things in C - this is obviously not easy. Apple doesn't need a new language, but they are actively trying something new and huge. 3. How long does it take to learn Swift? Is it easy? Swift has just been released, and the answer to this question is still hard to say. After trying for a few hours, I converted my Objective C program to Swift and it went very well. At first, I was really frustrated. However, once I compromised and accepted that the learning process might be a bit awkward, Swift's documentation became easier to read and problems could be solved easily when they encountered them. One of the best highlights of Swift is that it is very convenient to get rid of the constraints of C. It is very difficult to introduce Objective C to people who have no programming background. You have to explain all the exceptions to the rules and then start from the beginning to explain computer science topics in depth. Swift skips all this and just simply code. 4. Where does Swift draw inspiration from? Swift draws inspiration from many programming languages. When I code with it, I think of JavaScript, Go, Ruby, and other languages. Objective C is older. Swift is a very welcome change, and it has inspiration from many modern programming languages. 5. What is the goal of Swift? Apple's goal with Swift is to make it easy for anyone to learn and code quickly. I think they may want to completely eliminate Objective C in a few years. Being simple and easy to learn is very helpful, and it will also attract more developers to Apple's platform. 6. Swift vs. Microsoft and Google languages? When I use Swift, Google's Go language always comes to my mind. Go has great concurrency features, and I am happy to see that Apple has absorbed some of Go's features. Microsoft's C# language is also very concise. However, this is just the beginning of Apple's new language. 7. Can Swift save two or three lines of code? Of course. Compared with Objective C, Swift is extremely concise. A lot of content is written on one line, but it is still simple and easy to read. Of course, Objective C can also achieve a lot of functions, but the content will be very long and not convenient to read. Some new things that are very annoying to write in Objective C are a joy to write in Swift. I have only been using Swift for a day and I am writing code in Objective C again. However, I already miss Swift. As a winner of Toutiao's Qingyun Plan and Baijiahao's Bai+ Plan, the 2019 Baidu Digital Author of the Year, the Baijiahao's Most Popular Author in the Technology Field, the 2019 Sogou Technology and Culture Author, and the 2021 Baijiahao Quarterly Influential Creator, he has won many awards, including the 2013 Sohu Best Industry Media Person, the 2015 China New Media Entrepreneurship Competition Beijing Third Place, the 2015 Guangmang Experience Award, the 2015 China New Media Entrepreneurship Competition Finals Third Place, and the 2018 Baidu Dynamic Annual Powerful Celebrity. |
<<: MiTalk and Yixin can't save Microsoft XiaoIce
>>: Last day: Win8.1 please upgrade to Update
I believe that many new anchors have faced such a...
Why does Harvard Business School say that for eve...
"In the future, a home without a smart home ...
Audit Expert Liu FengqinDeputy Chief Physician He...
The first time I heard the word "tonality&qu...
With the continuous development of the Internet, ...
Coffee is one of the three major beverages in the...
Sogou promotion keyword data analysis is actually...
At the 2016 CES, drones, VR/AR, electric vehicles...
In this era of information explosion, are you sti...
Health has always been one of the most concerned ...
Recently, Huawei released its 2024 annual report....
Audit expert: Gu Haitong Deputy Chief Physician, ...
IDC recently released the 2022 V2 version of the ...
First of all, some "fat beef rolls" are...