techknowxpress@gmail.com
SWIFT
APPLE’S OVEN FRESH LANGUAGE
(RELEASE DATE: June,2-2014)
TechKnowXpress
PERSPECTIVE
 According to Greg Federighi,
(Apple senior vice president for software engineering)
"Swift is fast, it is modern, it is designed
for safety, and it enables a level of
interactivity and development that you've
never seen before on the platform."
TechKnowXpress
SWIFT & ITS PURPOSE
 To make development of apps for Apple's mobile
platform easier.
 To unify the procedural and object-oriented
portions of the language.
 Improve performance of App by removing
baggage's of legacy language
TechKnowXpress
TECHNICAL SPECIFICATION
 Xcode V6 beta offers development
platform for Swift
 Xcode V6 beta is compatible on MAC OS X
10.9.3 and above
TechKnowXpress
FEATURES OF SWIFT
TechKnowXpress
COMPARISON
 Objective-C is a hard language to pick up for
new developers.
 Swift makes getting started with app
development on Apple’s platforms easier.
 Swift feels more accessible than Objective-C.
 Swift is 3.9 times faster while objective-C is
2.8 times faster than python.
TechKnowXpress
LEXICAL STRUCTURE
 The lexical structure of Swift describes
what sequence of characters form valid
tokens of the language.
 These valid tokens form the lowest-level
building blocks of the language.
 They are used to describe the rest of the
language.
TechKnowXpress
GRAMMAR
Grammar
Statements
declarations
patterns
attributes
expressions
types
TechKnowXpress
GRAMMAR OF SWIFT
Grammar
STATEMENTS
declarations
patterns
attributes
expressions
types
expressionopt
declarationopt
loop-
statementopt
branch-
statementopt
labelled-
statement
control-transfer-
statementopt
statement
statementsopt
TechKnowXpress
GRAMMAR OF DECLARATION
Grammar
statements
DECLARATIONS
patterns
attributes
expressions
types
import constant variable typealias function enum struct
class
protocol
initializer
deinitializer
extension
subscript
operator
declaration
declarationsopt
TechKnowXpress
GRAMMAR OF PATTERN
Grammar
Statements
declarations
PATTERNS
attributes
expressions
types
wildcard-
pattern
type-
annotationopt
identifier-
pattern
type-
annotationopt
value-
binding-
pattern
tuple-pattern
type-
annotationopt
enum-
case-
pattern
type-
casting-
pattern
expression
-pattern
TechKnowXpress
GRAMMAR OF ATTRIBUTES
Grammar
statements
declarations
patterns
ATTRIBUTES
expressions
types
Attribute :-
@ attribute-
name
attribute-
argument-
clauseopt
Attribute-
name :-
identifier
Attribute-
argument-
clause :-
(balanced-
tokensopt)
Attributes :-
attribute
attributesopt
TechKnowXpress
GRAMMAR OF EXPRESSIONS
Grammar
statements
declarations
patterns
attributes
EXPRESSIONS
types
Expression:-
prefix-
expression
binary-
expressionsopt
Expression
List:-
expression|
expression ,
expression-
list
TechKnowXpress
GRAMMAR OF TYPES
Grammar
statements
declarations
patterns
attributes
expressions
TYPES
•array-type
•function-type
•type-identifier
•tuple-type
•optional-type
•implicitly-unwrapped-optional-type
•protocol-composition-type
•metatype-type
TechKnowXpress
REFERENCES
 For more information:
◦ Apple has released a guidebook for the
language in iBooks Store.
◦ InfoWorld.com
TechKnowXpress
techknowxpress@gmail.com

Swift