Swift - a new programming language from Apple, which will revolutionize
Tips Makradar / / December 19, 2019
During presentation of WWDC, Which was held on Monday, Apple introduced the new Swift programming language that Craig Federighi called «Objective-C without C».
It should be noted that Swift was not designed as a universal programming language. It was created specifically for the operating systems OS X and iOS, for Cocoa and Cocoa Touch. It is based on the basis of C and Objective-C, but it includes all the latest technology developed by Apple engineers in recent years (ARC and LLVM).
Swift is positioned as a modern, fast, interactive and safe programming language. Modern because of the new brief syntax: without headers and semicolons. So Swift is more reminiscent of a scripting language, although Apple does not want to compare it with Python. A simple example of «Hello world» to the Objective-C:
#import
#import
int main (void)
{
NSLog (@ »Hello, world n»!);
return 0;
}
And its equivalent in Swift:
println ( «Hello world!»)
Language is certainly elegant, but it is short, sometimes causes misunderstanding. For an introduction to a new language and explanations of all the uncertainties, Apple immediately provided
full documentationWhich will help in the study of the features of Swift.Apple plans for the new language is quite ambitious. She even expects that the new operating system will be written in the near future on the Swift. Although even now it can be used in the current code of any application, because it perfectly communicates with Objective-C. In the near future, Swift, of course, replace Objective-C, but until Apple is not going to write off.
But one of the most interesting and important aspects of Swift, perhaps, is its interactivity, which is reminiscent of the great times of Lisp. At the Playground, you can instantly view a piece of code, just by clicking on it. Some experts say that the new language reminds them of the former Apple designer Bret Victor, who was trying to make more visible Javascript. Others compare it to Wolfram, developed by respected scientist Stephen Wolfram. Andrew Stone, Apple-independent developer called it "simply stunning".
http://www.youtube.com/watch? v = 3tZig9AWMdc # t = 42
This video is dedicated to Swift, it will be extremely useful for both beginner and experienced programmers.
Apple has created Swift to attract new developers and to strengthen its ecosystem, as programmers using Swift, will the developers specifically for OS X and iOS. So, we can say that this language has been developed exclusively for the Apple kupertinovtsy needs.