Presentation is loading. Please wait.

Presentation is loading. Please wait.

What, Where and Why Swift

Similar presentations


Presentation on theme: "What, Where and Why Swift"— Presentation transcript:

1 What, Where and Why Swift
SwiftCLT Meetup – 10/24/2016

2 What is Swift The development of Swift as a language started in the summer of Released as 1.0 in the fall of 2014. Combine the best of all languages to produce one language to rule them all.

3 What is Swift “Swift is a new programming language for iOS, macOS, watchOS, and tvOS apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much- loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how software development works.” developer.apple.com

4 What is Swift Do a search for “What coding language is Swift most like” You will get lots of answers such as Swift syntax looks like this but functionally behaves like that. Or Swift borrowed this from Ruby, but fits more with Haskell. The point is is borrows from everywhere and this question does not have a clear answer.

5 What is Swift Swift was designed with a few things in mind Clarity
Modern Safe Performance

6 What is Swift Clarity & Safe let & var – Constants and Variables
No Mutable or Immutable Must have a value after init Encourages constants then vars

7 What is Swift Modern Type inference

8 What is Swift Safe Type safety Arrays must hold same type
Dictionary keys must all be the same type, values must be of the same type

9 What is Swift Clarity & Modern Clean loops

10 What is Swift Modern Powerful switch statements Interval Matching

11 What is Swift Modern Powerful switch statements Tuples

12 What is Swift Modern Powerful switch statements
Cases can have where clauses

13 What is Swift Modern Powerful switch statements Compound cases

14 What is Swift Clarity, Safe & Modern guard
use a guard statement to require that a condition must be true in order for the code after the guard statement to be executed. Allows error handling close to where the check is defined

15 What is Swift Safe Optionals Hold a value or nil Designated by the ?
Allow you to declare vars that don’t need a value at time of init When you go to use an optional you must unwrap it

16 What is Swift Clarity Optional Binding – avoid the pyramid of doom

17 What is Swift Modern Functions as first class citizens

18 What is Swift Safe Static typing - types are known at compile time, not deferred to run time All variables, constants, and functions must have their types declared in advance Type cannot change after declared

19 What is Swift Safe Static typing - types are known at compile time, not deferred to run time All variables, constants, and functions must have their types declared in advance Type cannot change after declared

20 What is Swift Safe Static typing - types are known at compile time, not deferred to run time All variables, constants, and functions must have their types declared in advance Type cannot change after declared

21 What is Swift Performance
Value type - Except class which pass by reference optimized memory usage as well as optimized CPU cycles for fast performance Dropping legacy C conventions has greatly improved Swift under the hood Fewer name collisions with implicit namespaces 

22 Where is Swift iOS watchOS macOS tvOS Linux

23 Where is Swift Server Side
Simplify the management and deployment of your app to the cloud IBM Cloud tools for Swift is a popular Mac App, providing developers with a familiar Xcode environment to easily deploy Swift apps to. IBM Bluemix, the only cloud optimized for Swift end-to-end. developer.ibm.com

24 Where is Swift Android “About the time Swift was going open source, representatives for three major brands — Google, Facebook and Uber — were at a meeting in London discussing the new language. Sources tell The Next Web that Google is considering making Swift a “first class” language for Android, while Facebook and Uber are also looking to make Swift more central to their operations.” “Google’s Android operating system currently supports Java as its first-class language, and sources say Swift is not meant to replace Java, at least initially. While the ongoing litigation with Oracle is likely cause for concern, sources say Google considers Swift to have a broader “upside” than Java.”

25 Why Swift It is predicted that by 2020, 70% of the world’s population will be using smartphones. In January, Swift overtook Objective-C to become the 14th most popular language in the TIOBE index. 9to5mac.com See the previous slides about Where is Swift

26 Why Swift Easy To Learn Easier to read: no @ or ; or [[[]]] Playground
Doesn’t have to be compiled (REPL)– see results real time Clean and simple syntax, Simplifies the special characters many languages need Compile time errors and warnings Simplified memory management (ARC supported throughout)

27 Why Swift Easier to maintain No legacy to hold it back -
not tied to C No header files No maintaining two files

28 Why Swift Open Source The Swift community is now driving where Swift goes Follow the updates suggestions and discussions Even suggest something yourself Could be ported to just about anywhere in the future

29 Why Swift Young With Swift 3.0 we really have our first stable version and it just came out

30 Why Swift Apple, Apple, Apple
This was Apple’s baby, they are not likely to be going anywhere soon

31 Why Swift Because all the cool kids are doing it!


Download ppt "What, Where and Why Swift"

Similar presentations


Ads by Google