Handybook: Swift Jayant Sani. Handybook Opinions “It’s like Ruby on Rails, for iOS!” – Nikita “A function should only do one thing and return.

Slides:



Advertisements
Similar presentations
Ruby (on Rails) CSE 190M, Spring 2009 Week 3. Web Programming in Ruby Ruby can be used to write dynamic web pages Similar to PHP, chunks of Ruby begins.
Advertisements

Compiler Design PROJECT PRESENTATION : COMPILER FOR OBJECTIVE C Harshal Waghmare Jeet Kumar Nandan Kumar Vishal Agrawal.
UFCFX5-15-3Mobile Device Development iOS Development Framework.
CS 4800 By Brandon Andrews.  Specifications  Goals  Applications  Design Steps  Testing.
COSC 120 Computer Programming
IPhone Development Crash Course By Dylan Harris
Introduction to Fortran Fortran Evolution Drawbacks of FORTRAN 77 Fortran 90 New features Advantages of Additions.
Ruby The Gem of new programming languages. An interpreted scripting language.
UFCFX5-15-3Mobile Device Development Swift Basics.
Closure and Environment Compiler Baojian Hua
Objective-C Quinton Palet. Introduction  Objective-C was developed to bring large scale software development the power of the object-oriented approach.
Introduction to Ruby CSE 413 Autumn 2008 Credit: Dan Grossman, CSE341.
CSSE501 Object-Oriented Development. Chapter 5: Messages, Instances and Initialization  This chapter examines OOP run-time features: Object Creation.
Groovy WHAT IS IT? HOW DOES IT WORK? IS IT USEFUL?
Learners Support Publications Pointers, Virtual Functions and Polymorphism.
Object Oriented Programming
Static and Dynamic Behavior CMPS Power of OOP Derives from the ability of objects to change their behavior dynamically at run time. Static – refers.
C++
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
A brief introduction to 11ACM 朱旻申. Outline What is Groovy ? Differences between Groovy & Java About closure & Dagger Methods.
Messages, Instances, and Initialization (Methods) CMPS 2143.
OS X Development Tom Schroeder. Table of Contents Who cares? HistoryObjective-CCocoaEnvironmentDesign.
Objective-C First Part adapted from a presentation by Kevin Layer.
OOP and Dynamic Method Binding Chapter 9. Object Oriented Programming Skipping most of this chapter Focus on 9.4, Dynamic method binding – Polymorphism.
More about Class 靜宜大學資工系 蔡奇偉副教授 ©2011. 大綱 Instance Class Members Class members can be associated with an instance of the class or with the class as a.
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
Chapter 2: A Brief History Object- Oriented Programming Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer.
Monday, August 31, 2015 CSCI 351 – Mobile Applications Development.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Python Functions.
More C++ Features True object initialisation
Compilers: Overview/1 1 Compiler Structures Objective – –what are the main features (structures) in a compiler? , Semester 1,
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
An Intertech Course Introduction to Swift for iOS Jason Shapiro, Intertech.
Objective-C Drew Cheng CS420. Overview True superset of ANSI C Object-Oriented methods from SmallTalk There is no formal written standard for the language.
LLVM Compiler Katie Dew. Lectures High-level overview of LLVM (Katie) Walkthrough of LLVM in context of our project (Jason) –Input requirements –Configuration.
Java Class Structure. Class Structure package declaration import statements class declaration class (static) variable declarations* instance variable.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 9 Inheritance and.
Static. 2 Objectives Introduce static keyword –examine syntax –describe common uses.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Introduction to Objective-C Spring Goals An introduction to Objective-C As implemented by the Apple LLVM Compiler 4.0 (a.k.a. Clang) Only the basics…
1 SWIFT 2.0: New features Dzianis Astravukh AUGUST 5, 2015.
Java FilesOops - Mistake Java lingoSyntax
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
The iOS Platform and SDK. iOS iPhoneiPad Mini iPad.
Bart van Kuik Application Developer Oracle Corporation.
The const Keyword Extreme Encapsulation. Humble Beginnings There are often cases in coding where it is helpful to use a const variable in a method or.
Swift. Introduced in 2014 Replaces Objective-C as “recommended development language” “safer, succinct, readable” Emphasizes type safety.
Writing Better C# Using C# 6 By: Mitchel Sellers.
Software Development Cycle From Wikipedia: fe-cycle
1 This week Basics of functions Stack frames Stack vs. Heap (brief intro) Calling conventions Storage classes vs. scope Library functions Overloading.
Python Programming Language by Vasu Chetty. Origins of Python Created by: Guido van Rossum, a Dutch Programmer Created during: Christmas Break, 1989 Created.
KIT305/607 Mobile Application Development – Apple iOS Swift, Comparison of Swift and Objective-C, Swift Basics, Playgrounds, Persistent Storage Dr. Rainer.
AxisTechnoLabs is leading provider of software development, web design & development solutions. We provide offshore software development outsourcing solutions.
Swift by Kevin Gamboa Teky Alvarado Hieu Tran Elizabeth Sanchez
Lecture 1 - Intro to Swift
Programming Languages Dan Grossman 2013
What, Where and Why Swift
iOS Development Framework
C Language By Sra Sontisirikit
Getting started in Eclipse
The Complete Guide For Programming Language Part 1
What to do today: Brief history of Ruby General qualities/info
Polymorphism CT1513.
The Lifecycle of an Object
C++Builder Existing user? Migration and Performance David Millington C++ Product Manager, Embarcadero.
Groovy.
CSC 581: Mobile App Development
Presentation transcript:

Handybook: Swift Jayant Sani

Handybook Opinions “It’s like Ruby on Rails, for iOS!” – Nikita “A function should only do one thing and return one value” - Justin

Brief History 1983: Objective-C is created 2000: Chris Lattner starts to work on LLVM, a compiler for Objective-C during college 2007: LLVM project releases Clang 2010: Lattner begins working on Swift 2012: Apple ditches GCC, giving LLVM more flexibility 2014: Apple announces Swift at WWDC

High-Level Overview Objective-C showing age – Smalltalk syntax o Around since the 1980s Many modifications to make it modern Compile time vs Runtime (Static and dynamic)

Modern Language Features No semicolons! Static type system Optional types Functional Programming Closures Tuples Generics Automatic Reference Counting Extensions REPL (Playgrounds) Designated and Convenience Initializers*

Static Type System Objective-C: Dynamic Typing, only object type was (id) in early stages Valid Objective-C code: NSString *string id str = string NSDictionary *dict= str; -Compiles fine, runtime error Swift: Static Typing

Guess what returns

Functional Objective-C: Blocks F*ckingblocksyntax.com returnType (^blockName)(parameterTypes) = ^returnType(parameters) { statements }; Swift: Functions are first class objects, Closures (param1Type, param2Type, …) -> returnType { (params) -> returnType in statements }

GenericsExtensions Tuples

Drawbacks Xcode 6 is very, very, very buggy – beta Proprietary Operator overloading – controversial No pointers – errors, functions Dealing with JSON Data Message passing vs. vtable Vague constants – “let” keyword No access modifiers Objective-C without Smalltalk