As Swift will forever change the world of programming
Makradar Technologies / / December 19, 2019
Chris Lattner half years creating a new programming language, and in all that time no one about it did not tell even his closest friends and colleagues. He started in the summer of 2010, working nights and weekends, and to the end of the year has already outlined the basics of a new language. It was then that he told me about his project of top-managers of the company who were so impressed that connected to the work of several more experienced engineers.
After another year and a half of his project became the main focus of the company, in which a huge number of professionals working side by side with Lattnerom were involved. This meant only one thing, the new programming language will soon have to change the computer world. Lattner, as you know, I worked at Apple.
The new language was called SwiftAnd Apple introduced it on public display during the WWDC June 2. After 4 years after Lattner proceeded to their offspring, a new language shocked everyone, except for a few knowledgeable Apple people.
Vikram Adve, Teacher of the University of Illinois, once Lattneru helped create the foundation for a single program, which then formed the basis for Swift. But, like everyone else, he was incredibly surprised that his student many years created a new programming language. «Apple is so secretive company, and it looks like Chris drank a magic potion," - he said, laughing, Adve. - "I knew he was working on a project that takes up all his time, but that's all I know."
Typically, when out of nowhere appears a new language, it takes a few years to win his audience. This is true even when it comes to such giants as Apple.
In 2009, Google introduced the Go language developed by the famous engineer Ken Thompson and Rob Pike, and he still has not gained much popularity in the world. But Swift - this is a different case. It can achieve mass use in the shortest possible time, exceeding the rate of development of Java and C # in the late '90s and early 2000s.
Advantage Swift lies in the fact that it is written for the average programmer, and is suitable for the creation of a simple mobile application. And with such a simple tool as Playgrounds, any developer can easily learn the language on their own. In addition, now in many programmers are a number of reasons for using Swift.
Today, hundreds of thousands of developers writing applications for the iPhone and iPad, using Objective-C. And because of the immense popularity of the platform, they will certainly continue to write them in the future. Swift contains significant improvements compared with Objective-C, which means that a huge community of developers around the world will start to learn a new language in the coming months.
"There was no real incentive to use Google Go», - said Paul Jansen, which tracked the use of different using Tiobe Index programming languages over the past 15 years. "The difference is that Swift, he is."
Already, about 2,400 projects at GitHub, the popular hosting service for open IT-projects, using Swift. And this month a new language debuted at number 16 on the list of the most talked-language version Tiobe. Yes, almost the same thing happened to Go in 2009, but since then the language has lost its influence. A Swift eventually should only strengthen their positions.
"People will go to the new language, because it is easier to write code," - says Jansen. - "They have to choose either Objective-C, or Swift. And most will choose the Swift ».
Chris Latter oversees Apple's developer tools, all the tools you use Apple engineers and third-party developers, engaged in software for personal computers, laptops, tablets and smartphones. As a graduate student at the University of Illinois, led by Vikram Adve, he created a system for developers called LLVMWhich now forms the basis of Xcode.
After Lattner joined Apple in 2005, the company switched to the LLVM, which affected how the Objective-C has been used by developers to create applications. And after 5 years Lattner introduced this system as a basis Swift.
He declined to be interviewed for this article, without the approval of Apple PR-department, but he briefly described the evolution of the Swift on your page. Even without going into details, we can say that Lattner Swift built in tandem with the existing Apple tools that developers can easily use the new language, along with Objective-C.
In other words, Swift - it's not just the language. He closely the interaction with other tools that allow developers to create their software. And they include not only the development of the built environment, but also, including the debugger, which identifies all code error. And most of these tools are familiar to every Apple developer. Generally, Apple engineers have created an easy transition for the tens of thousands of developers who write programs for the iPhone, iPad and Mac.
Since the developers have never worked with this language, they must have good reasons to switch from Objective-C to Swift. "I am the first and only to date a man with experience Swift work for 4 years", - wrote Lattner on Twitter.
To learn a new language takes time and hard work that often for many is a big problem. But Lattner and Apple led conclusive arguments in favor of Swift. We can not say that it is much more attractive than other languages such as C #, Ruby or Python. But this is a big step forward compared to the Objective-C, which has its roots in the mid-80s, and that is not so easy to use.
"A lot of people refuses to Objective-C because of its unusual syntax," - says Mike Ash, Apple engineer, who for the last 15 years of the development of various software companies, - "The Swift more correct, the standard syntax, which will interest those people". "It's made for a productive programmer and allows him to do more things in less time."
Lattner writes on his page, Playgrounds allows you to make programming more interactive and accessible. "On it strongly influenced the philosophy of the designer Bret Victor and interactive software system Light Table. As in the Light Table, it allows you to write code on one side of the screen and watch the results appear on the other. In other words, you can drive out the program at the time of her writing. "
During the WWDC 2014 Lattner demonstrated some possibilities Swift and Playgrounds on the example of a very simple game. Tools allow you to add new code without recompilation and restart the entire system. "When you make changes, they are introduced into an already running process, in the version of the program that works in this moment" - said Chris Granger, one of the creators of the Light Table.
"I hope that the programming will become more accessible and fun pastime," - wrote Lattner. - "We appeal to the new generation of programmers and helping to revise the methodology for teaching of computer science."
Light Table can do the same thing, only with different languages, such as Python, Clojure and Javascript. But, according to Granger, Playgrounds can be a particularly useful tool, because Swift has been specifically designed to work with him. "Because they have created this language and its control, they can do the things that we can not produce with other languages."
Playgrounds podglyuchivaet a little more, but now it can greatly reduce the time required to write code. "Instant feedback Playgrounds can attract a huge number of people in the new area."
Traditionally, there was a gulf between the compile programming languages such as Objective-C and C ++, and interpreted languages such as Python, Ruby and PHP. Using the first, you first have to write the code, and then wait for your compiler will transform it into a kind of software. But after the program is compiled, it will run very fast. Interpreted languages make it possible to test the program almost immediately, but work slowly. Swift collected best of both worlds. He is friendly both to the developer, and in relation to a computer.
Apple - not the only company that is exploring new programming. Facebook is trying to create something similar, developing languages and Hack D. Google this probes the soil with the help of Go, Mozilla is doing the same with Rust. But all of these languages are far from Swift.
Yes, they are freely available, and in theory, they can quickly spread through a variety of devices and services of other companies. With Swift - a completely different situation, its hardware and software strictly controlled. And, most likely, it will not be used for other platforms.
But even if it remains only for Apple, he will get a tremendous impact and spread, not comparable with any modern programming language. And all thanks to such popular iPhone, iPad and Mac.
Yes, many other languages may prodelyvat the same things as the Swift, and some are even better, but in the same Light Table is an alternative Playgrounds. Still, Swift is unique in its simplicity and interactivity, and now, after only a few months after its introduction, it is interesting to many tens of thousands of developers around the world.
via Wired