SlideShare a Scribd company logo
1 of 25
Developer’s Viewpoint on Swift
Programming Language
Agenda
• Overview
• Requirement of New Programming Language
• Why Swift?
• Is it a Right Time to Jump into Swift?
• Summary
Overview
• Chris Lattner, is the designer/creator/maker of Swift programming
language. Previously who has built the powerful LLVM (Low Level
Virtual Machine) compiler that Apple is using with XCode to build
Objective-C programs.
• After the success of LLVM, Apple invests Chris for designing a new
programming language Swift.
Drawbacks of Objective-C
In Objective-C,
• Need to Write more lines of code for the same functionality
• Memory Management is Difficult
• Can’t implement accurate automatic garbage collection in a
language that has pointers
Why Swift Programming Language?
Easy
Constants & Variables
Defining constants or variables is simple in Swift, use “let” to
define constant and “var” to define variable.
let companyName = "XYZ"
var stockPrice = 256
Easy
Type Inference
• Don’t require to specify the type with constants and variables.
• The Compiler automatically inferred it based on the value you
have assigned.
let userName = "Eric" // inferred as String
let userAge = 28 // inferred as Int
Easy
String Interpolation & Mutability
• include value in string using () to concatenating string
let Points = 500
let output = "Jimmy today you earned (Points) points.“
• The simple way of string Mutability with swift
var message = "Good Morning"
message += "Karan"
// Output will be "Good Morning Karan"
Easy
Optional Variable & Function Return Types
• You can define possibly missing or optional value in variables,
so you don’t need to worry about nil value exception
var optionValue: Int?
• You can also make your function return type options
func getUserName(userId: Int) -> String?
Easy
Array & Dictionary
• It's easier to work with Array & Dictionary
let usersArray = ["John","Duke","Panther","Larry"] // Array
println(usersArray [0])
let totalUsers = ["male":6, "female":5] // Dictionary
println(totalUsers["male"])
Easy
For-In: Ranges
• Just use .. to make range that exclude the upper value, or use
… to include the upper value in the range.
for i in 0...3 {
println("Index Value Is (i)")
}
Modern
Switch Cases
• Now it’s possible to compare any kind of data with Switches .
You can also make conditions with Case statement.
let user = "John Deep"
switch user {
case "John":
let output = "User name is John."
case let x where x.hasSuffix("Deep"):
let output = "Surname of user is (x)."
default:
let vegetableComment = "User not found."}
Modern
Functions
• You can return multiple values from the function using tuple
func getUserList() -> (String,String,String){
return ("John","Duke","Panther")
}
• You can also pass variable number of arguments, collecting
them Into an array
Modern
func addition(values:Int...) -> Int{
var total = 0
for value in values {
total += value
}
return total
}
• You can set the default parameter value into a function
func sayHello(name: String = "Hiren"){
println("Hello (name)")
}
Modern
Enumerations
• It’s providing multiple functionalities. Like classes, now you
can also write methods
into enumerations:
enum Section: Int {
case First = 1
case Second, Third, Fourth
case Fifth
func Message() -> String {
return "You are into wrong section"
} }
Modern
Closures
• You can write Closures without a name with braces ({})
var users = ["John","Duke","Panther","Larry"]
users.sort({(a: String, b: String) -> Bool in
return a < b
})
println(users)
// Output = ["Duke", "John", "Larry", "Panther"]
Modern
Tuples
• Tuples enable you to create and pass groupings of values.
Also, allow you to return multiple values as a single compound
value.
(404, "Page Not Found", 10.5) // (Int, String, Double)
Modern
Generics
• You can make generics of any functions, classes or
enumerations when you required variety of variable types.
enum jobType<T>{
case None
case Some(T)
}
Modern
Structs
• Structs are similar to classes, but it excludes inheritance,
deinitializers and reference counting.
struct normalStructure {
func message(userName: String) -> String{
return "Hello (userName)"
}
}
Fast
Auto Memory Management
• ARC working more accurately with Swift.
• ARC track and manage your app memory usage, so you did not
require managing memory yourself.
• ARC frees up your created objects when they are no longer
needed.
• ARC automatically identify the object which you want to hold
temporarily and which for long use by reference of every
object.
Fast
LLVM Compiler
• The LLVM compiler converts Swift code into native code.
• Using LLVM, it's possible to run Swift code side-by-side with
Objective-C.
• LLVM is currently the core technology of Apple developer
tools; it helps to get the most out of iPhone, iPad and Mac
hardware.
Fast
Playgrounds
• Playgrounds make writing Swift code simple & fast.
• Playgrounds help you to view your variables into a graph, it
directly displays output of your code, and you don't require to
compile it every time.
• Playground is like a testing tool of your code. First check
output of your code with playground, when you have
perfected it, just move it into your project.
• Playground will be more useful when you are designing any
new algorithm or experimenting with some new APIs.
Is it a Right Time to Jump into Swift?
NO!
Is it a Right Time to Jump into Swift?
• Swift & XCode-6 both is currently in a beta version.
• Many issues found in XCode-6, even in default templates of
Swift. It will take 2-3 months for stable release.
• In iOS Application development, 3rd party libraries &
frameworks are used which is in Objective-C. This will take
time to convert into Swift, May be 2-3 months or more time!
• You will argue that Apple provided functionality to work Swift
code side-by-side with Objective-C, but is it worth to develop
application in Swift using Objective-C libraries?
Summary
Learning advanced & new things into IT field is
defiantly a plus point. But when its used and
applied with proper supports it will be more
beneficial to you.
Follow Us:

More Related Content

What's hot

Oop2010 Scala Presentation Stal
Oop2010 Scala Presentation StalOop2010 Scala Presentation Stal
Oop2010 Scala Presentation StalMichael Stal
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptAmit Tyagi
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming LanguageRaghavan Mohan
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Languagezone
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basicsmsemenistyi
 
Session 2 - Objective-C basics
Session 2 - Objective-C basicsSession 2 - Objective-C basics
Session 2 - Objective-C basicsVu Tran Lam
 
Overview of c language
Overview of c languageOverview of c language
Overview of c languageshalini392
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming CourseDennis Chang
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course yoavrubin
 
Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++Rasan Samarasinghe
 

What's hot (18)

Oop2010 Scala Presentation Stal
Oop2010 Scala Presentation StalOop2010 Scala Presentation Stal
Oop2010 Scala Presentation Stal
 
Swift, swiftly
Swift, swiftlySwift, swiftly
Swift, swiftly
 
Javascript
JavascriptJavascript
Javascript
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Client sidescripting javascript
Client sidescripting javascriptClient sidescripting javascript
Client sidescripting javascript
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
The Java Script Programming Language
The  Java Script  Programming  LanguageThe  Java Script  Programming  Language
The Java Script Programming Language
 
Learn Java Part 2
Learn Java Part 2Learn Java Part 2
Learn Java Part 2
 
C#
C#C#
C#
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basics
 
Session 2 - Objective-C basics
Session 2 - Objective-C basicsSession 2 - Objective-C basics
Session 2 - Objective-C basics
 
Overview of c language
Overview of c languageOverview of c language
Overview of c language
 
C++ Programming Course
C++ Programming CourseC++ Programming Course
C++ Programming Course
 
16 virtual function
16 virtual function16 virtual function
16 virtual function
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
 
Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++
 
DIWE - Advanced PHP Concepts
DIWE - Advanced PHP ConceptsDIWE - Advanced PHP Concepts
DIWE - Advanced PHP Concepts
 

Viewers also liked

Administration and Management with UltraESB
Administration and Management with UltraESBAdministration and Management with UltraESB
Administration and Management with UltraESBAdroitLogic
 
Debug Program in Mule
Debug Program in MuleDebug Program in Mule
Debug Program in MuleVamsi Krishna
 
ESB 4.9.0 extension points, Connectors and Inbound Endpoints
ESB 4.9.0 extension points, Connectors and Inbound Endpoints ESB 4.9.0 extension points, Connectors and Inbound Endpoints
ESB 4.9.0 extension points, Connectors and Inbound Endpoints WSO2
 
WSO2 ESB and SOA
WSO2 ESB and SOAWSO2 ESB and SOA
WSO2 ESB and SOAWSO2
 
Enterprise Integration made easy with WSO2 ESB
Enterprise Integration made easy with WSO2 ESBEnterprise Integration made easy with WSO2 ESB
Enterprise Integration made easy with WSO2 ESBWSO2
 
Systems management - UltraESB
Systems management - UltraESBSystems management - UltraESB
Systems management - UltraESBAdroitLogic
 
Magento 2.0 - eCommerce Web Portal Solutions | Case Study
Magento 2.0 - eCommerce Web Portal Solutions | Case StudyMagento 2.0 - eCommerce Web Portal Solutions | Case Study
Magento 2.0 - eCommerce Web Portal Solutions | Case StudyAzilen Technologies Pvt. Ltd.
 
Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0 Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0 Kasun Indrasiri
 
Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)Vamsi Krishna
 
WSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise IntegrationWSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise IntegrationKasun Indrasiri
 
System Configuration for UltraESB
System Configuration for UltraESBSystem Configuration for UltraESB
System Configuration for UltraESBAdroitLogic
 

Viewers also liked (20)

Overview of ESB at Azilen Tech Meetup
Overview of ESB at Azilen Tech MeetupOverview of ESB at Azilen Tech Meetup
Overview of ESB at Azilen Tech Meetup
 
Xamarin the good, the bad and the ugly
Xamarin  the good, the bad and the uglyXamarin  the good, the bad and the ugly
Xamarin the good, the bad and the ugly
 
Siddhi CEP 2nd sideshow presentation
Siddhi CEP 2nd sideshow presentationSiddhi CEP 2nd sideshow presentation
Siddhi CEP 2nd sideshow presentation
 
Siddhi CEP 1st presentation
Siddhi CEP 1st presentationSiddhi CEP 1st presentation
Siddhi CEP 1st presentation
 
Administration and Management with UltraESB
Administration and Management with UltraESBAdministration and Management with UltraESB
Administration and Management with UltraESB
 
Mule connectors
Mule connectorsMule connectors
Mule connectors
 
Debug Program in Mule
Debug Program in MuleDebug Program in Mule
Debug Program in Mule
 
ESB 4.9.0 extension points, Connectors and Inbound Endpoints
ESB 4.9.0 extension points, Connectors and Inbound Endpoints ESB 4.9.0 extension points, Connectors and Inbound Endpoints
ESB 4.9.0 extension points, Connectors and Inbound Endpoints
 
Wso2 esb
Wso2 esbWso2 esb
Wso2 esb
 
WSO2 ESB and SOA
WSO2 ESB and SOAWSO2 ESB and SOA
WSO2 ESB and SOA
 
Enterprise Integration made easy with WSO2 ESB
Enterprise Integration made easy with WSO2 ESBEnterprise Integration made easy with WSO2 ESB
Enterprise Integration made easy with WSO2 ESB
 
Systems management - UltraESB
Systems management - UltraESBSystems management - UltraESB
Systems management - UltraESB
 
Magento 2.0 - eCommerce Web Portal Solutions | Case Study
Magento 2.0 - eCommerce Web Portal Solutions | Case StudyMagento 2.0 - eCommerce Web Portal Solutions | Case Study
Magento 2.0 - eCommerce Web Portal Solutions | Case Study
 
Microintegration
MicrointegrationMicrointegration
Microintegration
 
WSO2 Gateway
WSO2 GatewayWSO2 Gateway
WSO2 Gateway
 
Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0 Deep-dive into WSO2 ESB 5.0
Deep-dive into WSO2 ESB 5.0
 
Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)Mulesoft - Documentation (Automation)
Mulesoft - Documentation (Automation)
 
WSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise IntegrationWSO2-ESB - The backbone of Enterprise Integration
WSO2-ESB - The backbone of Enterprise Integration
 
System Configuration for UltraESB
System Configuration for UltraESBSystem Configuration for UltraESB
System Configuration for UltraESB
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 

Similar to Developer’s viewpoint on swift programming language

Java-Intro.pptx
Java-Intro.pptxJava-Intro.pptx
Java-Intro.pptxVijalJain3
 
Lecture1_introduction to python.pptx
Lecture1_introduction to python.pptxLecture1_introduction to python.pptx
Lecture1_introduction to python.pptxMohammedAlYemeni1
 
What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)Moaid Hathot
 
Scala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryScala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryPray Desai
 
Introduction to Kotlin for Android developers
Introduction to Kotlin for Android developersIntroduction to Kotlin for Android developers
Introduction to Kotlin for Android developersMohamed Wael
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programmingDrRajeshkumarPPatel
 
Swift programming language
Swift programming languageSwift programming language
Swift programming languageNijo Job
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxsandeshshahapur
 
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxStatic abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxMarco Parenzan
 

Similar to Developer’s viewpoint on swift programming language (20)

Unit 1
Unit 1Unit 1
Unit 1
 
Java-Intro.pptx
Java-Intro.pptxJava-Intro.pptx
Java-Intro.pptx
 
Java Fx
Java FxJava Fx
Java Fx
 
Lecture1_introduction to python.pptx
Lecture1_introduction to python.pptxLecture1_introduction to python.pptx
Lecture1_introduction to python.pptx
 
Core JavaScript
Core JavaScriptCore JavaScript
Core JavaScript
 
Java introduction
Java introductionJava introduction
Java introduction
 
What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)What's coming to c# (Tel-Aviv, 2018)
What's coming to c# (Tel-Aviv, 2018)
 
Scala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryScala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud Foundry
 
Scala-Ls1
Scala-Ls1Scala-Ls1
Scala-Ls1
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Introduction to Kotlin for Android developers
Introduction to Kotlin for Android developersIntroduction to Kotlin for Android developers
Introduction to Kotlin for Android developers
 
Should i Go there
Should i Go thereShould i Go there
Should i Go there
 
Dart programming language
Dart programming languageDart programming language
Dart programming language
 
C for Engineers
C for EngineersC for Engineers
C for Engineers
 
Chapter-introduction about java programming
Chapter-introduction about java programmingChapter-introduction about java programming
Chapter-introduction about java programming
 
Swift programming language
Swift programming languageSwift programming language
Swift programming language
 
TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
 
Aspdot
AspdotAspdot
Aspdot
 
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxStatic abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
 

More from Azilen Technologies Pvt. Ltd.

[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...Azilen Technologies Pvt. Ltd.
 
How to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behaviorHow to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behaviorAzilen Technologies Pvt. Ltd.
 
Realm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilitiesRealm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilitiesAzilen Technologies Pvt. Ltd.
 
A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...Azilen Technologies Pvt. Ltd.
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...Azilen Technologies Pvt. Ltd.
 
Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!Azilen Technologies Pvt. Ltd.
 
How to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website applicationHow to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website applicationAzilen Technologies Pvt. Ltd.
 
iPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce StoreiPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce StoreAzilen Technologies Pvt. Ltd.
 
[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...Azilen Technologies Pvt. Ltd.
 
Rfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning pathRfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning pathAzilen Technologies Pvt. Ltd.
 
[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...Azilen Technologies Pvt. Ltd.
 
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...Azilen Technologies Pvt. Ltd.
 

More from Azilen Technologies Pvt. Ltd. (20)

Software Product Development for Startups.pdf
Software Product Development for Startups.pdfSoftware Product Development for Startups.pdf
Software Product Development for Startups.pdf
 
How Chatbots Empower Healthcare Ecosystem?
How Chatbots Empower Healthcare Ecosystem?How Chatbots Empower Healthcare Ecosystem?
How Chatbots Empower Healthcare Ecosystem?
 
[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...[Step by-step guide] configure document generation functionality in ms dynami...
[Step by-step guide] configure document generation functionality in ms dynami...
 
How to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behaviorHow to overcome operational challenges in getting consistent beacon behavior
How to overcome operational challenges in getting consistent beacon behavior
 
Liferay dxp – the good, the bad and the ugly
Liferay dxp – the good, the bad and the uglyLiferay dxp – the good, the bad and the ugly
Liferay dxp – the good, the bad and the ugly
 
Realm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilitiesRealm mobile platform – explore real time data synchronization capabilities
Realm mobile platform – explore real time data synchronization capabilities
 
A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...A step by step guide to develop temperature sensor io t application using ibm...
A step by step guide to develop temperature sensor io t application using ibm...
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
 
Register Virtual Device and analyze the device data
Register Virtual Device and analyze the device dataRegister Virtual Device and analyze the device data
Register Virtual Device and analyze the device data
 
Analytics and etl based bi solutions
Analytics and etl based bi solutionsAnalytics and etl based bi solutions
Analytics and etl based bi solutions
 
Advanced risk management &amp; mitigation system
Advanced risk management &amp; mitigation systemAdvanced risk management &amp; mitigation system
Advanced risk management &amp; mitigation system
 
Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!Server driven user interface (sdui) – framework for i os applications!
Server driven user interface (sdui) – framework for i os applications!
 
How to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website applicationHow to integrate portlet as widget in liferay to any website application
How to integrate portlet as widget in liferay to any website application
 
A walkthrough of recently held wwdc17
A walkthrough of recently held wwdc17A walkthrough of recently held wwdc17
A walkthrough of recently held wwdc17
 
How wearable devices are changing our lives
How wearable devices are changing our livesHow wearable devices are changing our lives
How wearable devices are changing our lives
 
iPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce StoreiPad Application as Return Process Automation Solution for eCommerce Store
iPad Application as Return Process Automation Solution for eCommerce Store
 
[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...[Part 3] automation of home appliances using raspberry pi – all set to automa...
[Part 3] automation of home appliances using raspberry pi – all set to automa...
 
Rfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning pathRfid systems for asset management — the young technology on its winning path
Rfid systems for asset management — the young technology on its winning path
 
[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...
 
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...
 

Recently uploaded

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Developer’s viewpoint on swift programming language

  • 1. Developer’s Viewpoint on Swift Programming Language
  • 2. Agenda • Overview • Requirement of New Programming Language • Why Swift? • Is it a Right Time to Jump into Swift? • Summary
  • 3. Overview • Chris Lattner, is the designer/creator/maker of Swift programming language. Previously who has built the powerful LLVM (Low Level Virtual Machine) compiler that Apple is using with XCode to build Objective-C programs. • After the success of LLVM, Apple invests Chris for designing a new programming language Swift.
  • 4. Drawbacks of Objective-C In Objective-C, • Need to Write more lines of code for the same functionality • Memory Management is Difficult • Can’t implement accurate automatic garbage collection in a language that has pointers
  • 6. Easy Constants & Variables Defining constants or variables is simple in Swift, use “let” to define constant and “var” to define variable. let companyName = "XYZ" var stockPrice = 256
  • 7. Easy Type Inference • Don’t require to specify the type with constants and variables. • The Compiler automatically inferred it based on the value you have assigned. let userName = "Eric" // inferred as String let userAge = 28 // inferred as Int
  • 8. Easy String Interpolation & Mutability • include value in string using () to concatenating string let Points = 500 let output = "Jimmy today you earned (Points) points.“ • The simple way of string Mutability with swift var message = "Good Morning" message += "Karan" // Output will be "Good Morning Karan"
  • 9. Easy Optional Variable & Function Return Types • You can define possibly missing or optional value in variables, so you don’t need to worry about nil value exception var optionValue: Int? • You can also make your function return type options func getUserName(userId: Int) -> String?
  • 10. Easy Array & Dictionary • It's easier to work with Array & Dictionary let usersArray = ["John","Duke","Panther","Larry"] // Array println(usersArray [0]) let totalUsers = ["male":6, "female":5] // Dictionary println(totalUsers["male"])
  • 11. Easy For-In: Ranges • Just use .. to make range that exclude the upper value, or use … to include the upper value in the range. for i in 0...3 { println("Index Value Is (i)") }
  • 12. Modern Switch Cases • Now it’s possible to compare any kind of data with Switches . You can also make conditions with Case statement. let user = "John Deep" switch user { case "John": let output = "User name is John." case let x where x.hasSuffix("Deep"): let output = "Surname of user is (x)." default: let vegetableComment = "User not found."}
  • 13. Modern Functions • You can return multiple values from the function using tuple func getUserList() -> (String,String,String){ return ("John","Duke","Panther") } • You can also pass variable number of arguments, collecting them Into an array
  • 14. Modern func addition(values:Int...) -> Int{ var total = 0 for value in values { total += value } return total } • You can set the default parameter value into a function func sayHello(name: String = "Hiren"){ println("Hello (name)") }
  • 15. Modern Enumerations • It’s providing multiple functionalities. Like classes, now you can also write methods into enumerations: enum Section: Int { case First = 1 case Second, Third, Fourth case Fifth func Message() -> String { return "You are into wrong section" } }
  • 16. Modern Closures • You can write Closures without a name with braces ({}) var users = ["John","Duke","Panther","Larry"] users.sort({(a: String, b: String) -> Bool in return a < b }) println(users) // Output = ["Duke", "John", "Larry", "Panther"]
  • 17. Modern Tuples • Tuples enable you to create and pass groupings of values. Also, allow you to return multiple values as a single compound value. (404, "Page Not Found", 10.5) // (Int, String, Double)
  • 18. Modern Generics • You can make generics of any functions, classes or enumerations when you required variety of variable types. enum jobType<T>{ case None case Some(T) }
  • 19. Modern Structs • Structs are similar to classes, but it excludes inheritance, deinitializers and reference counting. struct normalStructure { func message(userName: String) -> String{ return "Hello (userName)" } }
  • 20. Fast Auto Memory Management • ARC working more accurately with Swift. • ARC track and manage your app memory usage, so you did not require managing memory yourself. • ARC frees up your created objects when they are no longer needed. • ARC automatically identify the object which you want to hold temporarily and which for long use by reference of every object.
  • 21. Fast LLVM Compiler • The LLVM compiler converts Swift code into native code. • Using LLVM, it's possible to run Swift code side-by-side with Objective-C. • LLVM is currently the core technology of Apple developer tools; it helps to get the most out of iPhone, iPad and Mac hardware.
  • 22. Fast Playgrounds • Playgrounds make writing Swift code simple & fast. • Playgrounds help you to view your variables into a graph, it directly displays output of your code, and you don't require to compile it every time. • Playground is like a testing tool of your code. First check output of your code with playground, when you have perfected it, just move it into your project. • Playground will be more useful when you are designing any new algorithm or experimenting with some new APIs.
  • 23. Is it a Right Time to Jump into Swift? NO!
  • 24. Is it a Right Time to Jump into Swift? • Swift & XCode-6 both is currently in a beta version. • Many issues found in XCode-6, even in default templates of Swift. It will take 2-3 months for stable release. • In iOS Application development, 3rd party libraries & frameworks are used which is in Objective-C. This will take time to convert into Swift, May be 2-3 months or more time! • You will argue that Apple provided functionality to work Swift code side-by-side with Objective-C, but is it worth to develop application in Swift using Objective-C libraries?
  • 25. Summary Learning advanced & new things into IT field is defiantly a plus point. But when its used and applied with proper supports it will be more beneficial to you. Follow Us: