Swift 4.0, programming language, Review the new

Swift 4 brings changes and makes developer's life easier. Read a full review of updates with examples
By: Sigma Software Inc.
 
NEW YORK - Oct. 23, 2017 - PRLog -- Apple announced(link is external) (https://swift.org/blog/swift-4-0-released/) release of Swift 4.0 on the official blog of Swift language. Great news is that new Swift doesn't contain so many epic changes like Swift 3.0 did, and most changes have full backwards compatibility. So you can just relax and kick back, let's take a quick look at all innovations.

1. ONE-SIDED RANGES
RangeExpression protocol was added to simplify the creation of methods that use ranges. Also, the standard library can detect start and end indices of ranges from now, so you don't need to explicitly specify them [SE-0172] (https://github.com/apple/swift-evolution/blob/master/proposals/0172-one-sided-ranges.md)
2. STRINGS AND CHARS UPDATES
Multi-line String Literals

The multi-line string literals come in handy when you need to build long formatted texts for UI or XML or JSON messages. In Swift 4, you can do this using three double-quotes (""") [SE-0168](link is external):
3. PRIVATE ACCESS MODIFIER FOR EXTENSIONS
Swift 4 realizes the original intent by sharing the same access control scope between a type and any extension of said type. This only holds true within the same source file [SE-0169](link is external) (https://github.com/apple/swift-evolution/blob/master/prop...):
4. SMART KEYPATHS
Unlike the string-based key paths in Cocoa, Swift key paths are strongly typed. Now to create a key path, you simply use a back-slash followed by the property you're interested in:

Read full article: https://goo.gl/JgyRp3

Contact
Alina
***@sigma.software
End
Source:Sigma Software Inc.
Email:***@sigma.software
Tags:Swift, Swift Programming, Ios App Development
Industry:Software
Location:New York City - New York - United States
Account Phone Number Verified     Disclaimer     Report Abuse
Sigma Software News
Trending
Most Viewed
Daily News



Like PRLog?
9K2K1K
Click to Share