📜 ⬆️ ⬇️

Swift - innovations

image

Hi, Habr!

I have no doubt that many of us yesterday watched the presentation of Apple's WWDC 2014. A new OS X Yosemite operating system was presented, as well as iOS 8. But the main thing that Apple programmers around the world probably excited about was the new language - Swift!
')
Swift is a new innovative programming language for the Cocoa and Cocoa Touch with an even shorter and more expressive syntax by which applications are written with lightning speed. It makes writing code more interactive and more fun, and works side by side with Objective-C. According to Federighi, some Swift functions work faster than in other object-oriented languages: for example, sorting of complex objects is 3.9 times faster than in Python, and almost one and a half times faster than in Objective-C.

I would like to highlight a few major innovations:

Variables and constants:



The type is assigned by machine:



Comparing method names:



Calling methods:



Condition if:



ENUM:



That's all for now.

Share your opinions.

Source: https://habr.com/ru/post/225089/


All Articles