SlideShare a Scribd company logo
the f&t&re of 
functional programming 
on iOS 
Ash Furrow, Artsy
Objective-C
Closures 
Functional patterns 
Concise syntax 
Native Collections 
Operator overloading 
Namespaces Tuples 
Clear mutability syntax 
Interactive playground Multiple return types 
Generics 
Protocols and extensions on structs 
Pattern matching 
Fast iteration 
Optional types 
Object orientation 
Type inference 
Read-Eval-Print-Loop (REPL) 
Compile to native code
Closures 
Functional patterns 
Concise syntax 
Native Collections 
Operator overloading 
Namespaces Tuples 
Clear mutability syntax 
Interactive playground Multiple return types 
Generics 
Protocols and extensions on structs 
Pattern matching 
Fast iteration 
Optional types 
Object orientation 
Type inference 
Read-Eval-Print-Loop (REPL) 
Compile to native code
Closures 
Functional patterns 
Concise syntax 
Native Collections 
Operator overloading 
Namespaces Tuples 
Clear mutability syntax 
Interactive playground Multiple return types 
Generics 
Protocols and extensions on structs 
Pattern matching 
Fast iteration 
Optional types 
Object orientation 
Type inference 
Read-Eval-Print-Loop (REPL) 
Compile to native code
Objective-C
It will not be we make apps for the WATCH 5 
and the other future iOS devices. 
It will be a group of developers very much like us. 
But with more of our strengths and fewer of our weaknesses. 
More confident, far-seeing, 
and capable of using functional paradigms. 
For all of our failings, despite our limitations and fallibilities, 
we developers are capable of greatness. 
—Carl Sagan
1. Imperative prog5amming is old and busted 
2. Functional prog5amming is the new ho?@ess 
3. Ge?ing starCed with f&nctional prog5amming in Swiſt is super-­‐easy
old 
and 
busted
ANDA MASK ;AND A with Mask 
BNE ADD1 
BRA NONE1 
ADD1 INY ;increment our counter of 1's 
NONE1 LDAA TEMP ;reload accumulator A 
LSL MASK ;Shift the mask's 1 bit left 
BNE LOOP1 ;If we haven't finished our loop, branch 
LDAA #$01 ;load new mask into A 
STAA MASK ;store the reset mask into MASK 
TSX ;pull of return address and store in X 
PULA ;pull off A 
STAA TEMP ;store the value into temp 
TXS ;push return address back onto the stack 
LOOP2 LDAA TEMP ;Load A into TEMP 
ANDA MASK ;logical AND MASK with A 
BNE ADD2 ;add one if we need to 
BRA NONE2 
ADD2 INY ;increment our counter of 1's 
NONE2 LDAA TEMP 
LSL MASK ;shift our mask left by one 
BNE LOOP2 ;loop back until we've exhausted positions
new 
hottness
functional programming 
• It’s been around forever 
• But only in universities (ew)
what is functional programming? 
• Treat computation as the result of functions 
• Avoid mutable state and data
f&nctional prog5amming tells the computer 
instead of 
what to do 
how to do it
getting started 
is 
super-easy
code let’s
github.com/ashfurrow/minsk
resources 
• Books 
• Blogs 
• GitHub 
• ReactiveCocoa 
• LlamaKit 
• Stack Overflow 
• Tweet me
objc.io/books
github.com/artsy/eidolon
1. Imperative prog5amming is old and busted 
2. Functional prog5amming is the new ho?@ess 
3. Ge?ing starCed with f&nctional prog5amming in Swiſt is super-­‐easy
so where now? 
• Swift promised functional patterns 
• Failed to deliver 
• Community is picking up the slack
make 
better mistakes 
tomorrow
thanks 
@ashfurrow

More Related Content

Viewers also liked

Обзор платформы Tizen
Обзор платформы TizenОбзор платформы Tizen
Обзор платформы Tizen
Elena Voynova
 
Ash Furrow, Teaching and learning
Ash Furrow, Teaching and learning Ash Furrow, Teaching and learning
Ash Furrow, Teaching and learning
Elena Voynova
 
Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...
Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...
Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...Elena Voynova
 
Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...
Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...
Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...
Elena Voynova
 
Монетизация образовательного сервиса
Монетизация образовательного сервисаМонетизация образовательного сервиса
Монетизация образовательного сервиса
AppTractor
 

Viewers also liked (6)

Обзор платформы Tizen
Обзор платформы TizenОбзор платформы Tizen
Обзор платформы Tizen
 
Ash Furrow, Teaching and learning
Ash Furrow, Teaching and learning Ash Furrow, Teaching and learning
Ash Furrow, Teaching and learning
 
Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...
Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...
Mobile developer and business day 2013 Pruffi Состояние кадров в мобильной ра...
 
Mdday 2013 Mityakin
Mdday 2013 MityakinMdday 2013 Mityakin
Mdday 2013 Mityakin
 
Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...
Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...
Константин Дегтярев, LinguaLeo. Три кейса повышения метрик на мобильных устро...
 
Монетизация образовательного сервиса
Монетизация образовательного сервисаМонетизация образовательного сервиса
Монетизация образовательного сервиса
 

Similar to Ash Furrow, Functional programming in swift

Os Worthington
Os WorthingtonOs Worthington
Os Worthington
oscon2007
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentation
Martin Odersky
 
advancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxadvancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptx
ssuser6a1dbf
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of Scala
Scala Italy
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming Language
Reham AlBlehid
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
Mohsen Zainalpour
 
Weird Plsql
Weird PlsqlWeird Plsql
Weird Plsql
webanddb
 
Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San Francisco
Martin Odersky
 
Devoxx
DevoxxDevoxx
[ASM]Lab6
[ASM]Lab6[ASM]Lab6
[ASM]Lab6
Nora Youssef
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 Recap
Dave Orme
 
Java 8-revealed
Java 8-revealedJava 8-revealed
Java 8-revealed
Hamed Hatami
 
The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compiler
Vladimir Sedach
 
Introduction to Erlang Programming Language
Introduction to Erlang Programming LanguageIntroduction to Erlang Programming Language
Introduction to Erlang Programming Language
Yasas Gunarathne
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinay
Viplav Jain
 
IN4308 1
IN4308 1IN4308 1
IN4308 1
Eelco Visser
 
Introduction to Clojure
Introduction to ClojureIntroduction to Clojure
Introduction to Clojure
Renzo Borgatti
 
Oracle Objects And Transactions
Oracle Objects And TransactionsOracle Objects And Transactions
Oracle Objects And Transactions
tepsum
 
F# for Scala developers
F# for Scala developersF# for Scala developers
F# for Scala developers
Alfonso Garcia-Caro
 
presentationofswift.pptx
presentationofswift.pptxpresentationofswift.pptx
presentationofswift.pptx
Balakumar232
 

Similar to Ash Furrow, Functional programming in swift (20)

Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentation
 
advancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptxadvancedzplmacroprogramming_081820.pptx
advancedzplmacroprogramming_081820.pptx
 
Martin Odersky - Evolution of Scala
Martin Odersky - Evolution of ScalaMartin Odersky - Evolution of Scala
Martin Odersky - Evolution of Scala
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming Language
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
 
Weird Plsql
Weird PlsqlWeird Plsql
Weird Plsql
 
Scala Days San Francisco
Scala Days San FranciscoScala Days San Francisco
Scala Days San Francisco
 
Devoxx
DevoxxDevoxx
Devoxx
 
[ASM]Lab6
[ASM]Lab6[ASM]Lab6
[ASM]Lab6
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 Recap
 
Java 8-revealed
Java 8-revealedJava 8-revealed
Java 8-revealed
 
The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compiler
 
Introduction to Erlang Programming Language
Introduction to Erlang Programming LanguageIntroduction to Erlang Programming Language
Introduction to Erlang Programming Language
 
Scala final ppt vinay
Scala final ppt vinayScala final ppt vinay
Scala final ppt vinay
 
IN4308 1
IN4308 1IN4308 1
IN4308 1
 
Introduction to Clojure
Introduction to ClojureIntroduction to Clojure
Introduction to Clojure
 
Oracle Objects And Transactions
Oracle Objects And TransactionsOracle Objects And Transactions
Oracle Objects And Transactions
 
F# for Scala developers
F# for Scala developersF# for Scala developers
F# for Scala developers
 
presentationofswift.pptx
presentationofswift.pptxpresentationofswift.pptx
presentationofswift.pptx
 

More from Elena Voynova

Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...
Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...
Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...
Elena Voynova
 
Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...
Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...
Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...
Elena Voynova
 
Родион Насакин, Evernote
Родион Насакин, EvernoteРодион Насакин, Evernote
Родион Насакин, Evernote
Elena Voynova
 
мобильная реклама вконтакте. mobile developer & business day belarus 2014
мобильная реклама вконтакте. mobile developer & business day belarus 2014мобильная реклама вконтакте. mobile developer & business day belarus 2014
мобильная реклама вконтакте. mobile developer & business day belarus 2014
Elena Voynova
 
Светлана Емельянова, Intel
Светлана Емельянова, IntelСветлана Емельянова, Intel
Светлана Емельянова, Intel
Elena Voynova
 
Всеволод Шмыров, Яндекс
Всеволод Шмыров, ЯндексВсеволод Шмыров, Яндекс
Всеволод Шмыров, Яндекс
Elena Voynova
 
Алёна Паньшина, Яндекс
Алёна Паньшина, Яндекс Алёна Паньшина, Яндекс
Алёна Паньшина, Яндекс
Elena Voynova
 
Мобильный словарь блондинки
Мобильный словарь блондинкиМобильный словарь блондинки
Мобильный словарь блондинки
Elena Voynova
 
Samsung Mobile SDK
Samsung Mobile SDKSamsung Mobile SDK
Samsung Mobile SDK
Elena Voynova
 
Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...
Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...
Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...Elena Voynova
 
Mobile developer day 2013. как рассчитать стоимость разработки
Mobile developer day 2013. как рассчитать стоимость разработки Mobile developer day 2013. как рассчитать стоимость разработки
Mobile developer day 2013. как рассчитать стоимость разработки Elena Voynova
 

More from Elena Voynova (11)

Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...
Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...
Денис Царев, Convergent media Group. Как вывести свой бизнес в мобайл и не пр...
 
Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...
Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...
Станислав Литвинов , Mobionetwork покупаем трафик и продвигаем приложение пра...
 
Родион Насакин, Evernote
Родион Насакин, EvernoteРодион Насакин, Evernote
Родион Насакин, Evernote
 
мобильная реклама вконтакте. mobile developer & business day belarus 2014
мобильная реклама вконтакте. mobile developer & business day belarus 2014мобильная реклама вконтакте. mobile developer & business day belarus 2014
мобильная реклама вконтакте. mobile developer & business day belarus 2014
 
Светлана Емельянова, Intel
Светлана Емельянова, IntelСветлана Емельянова, Intel
Светлана Емельянова, Intel
 
Всеволод Шмыров, Яндекс
Всеволод Шмыров, ЯндексВсеволод Шмыров, Яндекс
Всеволод Шмыров, Яндекс
 
Алёна Паньшина, Яндекс
Алёна Паньшина, Яндекс Алёна Паньшина, Яндекс
Алёна Паньшина, Яндекс
 
Мобильный словарь блондинки
Мобильный словарь блондинкиМобильный словарь блондинки
Мобильный словарь блондинки
 
Samsung Mobile SDK
Samsung Mobile SDKSamsung Mobile SDK
Samsung Mobile SDK
 
Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...
Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...
Какую схему бюджетирования выбрать: Fixed Price или Time & Material? Mobile d...
 
Mobile developer day 2013. как рассчитать стоимость разработки
Mobile developer day 2013. как рассчитать стоимость разработки Mobile developer day 2013. как рассчитать стоимость разработки
Mobile developer day 2013. как рассчитать стоимость разработки
 

Recently uploaded

一比一原版(soton毕业证书)南安普顿大学毕业证如何办理
一比一原版(soton毕业证书)南安普顿大学毕业证如何办理一比一原版(soton毕业证书)南安普顿大学毕业证如何办理
一比一原版(soton毕业证书)南安普顿大学毕业证如何办理
sf3cfttw
 
一比一原版美国麻省大学波士顿分校毕业证如何办理
一比一原版美国麻省大学波士顿分校毕业证如何办理一比一原版美国麻省大学波士顿分校毕业证如何办理
一比一原版美国麻省大学波士顿分校毕业证如何办理
obaem
 
eSIM and Virtual SIM Data Plans with GhostSims
eSIM and Virtual SIM Data Plans with GhostSimseSIM and Virtual SIM Data Plans with GhostSims
eSIM and Virtual SIM Data Plans with GhostSims
Ghost Sims
 
一比一原版美国宾州州立大学毕业证(psu学位证)如何办理
一比一原版美国宾州州立大学毕业证(psu学位证)如何办理一比一原版美国宾州州立大学毕业证(psu学位证)如何办理
一比一原版美国宾州州立大学毕业证(psu学位证)如何办理
mjjbdpo2
 
How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...
How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...
How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...
Grest Grest.in
 
一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理
一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理
一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理
toynvu
 

Recently uploaded (6)

一比一原版(soton毕业证书)南安普顿大学毕业证如何办理
一比一原版(soton毕业证书)南安普顿大学毕业证如何办理一比一原版(soton毕业证书)南安普顿大学毕业证如何办理
一比一原版(soton毕业证书)南安普顿大学毕业证如何办理
 
一比一原版美国麻省大学波士顿分校毕业证如何办理
一比一原版美国麻省大学波士顿分校毕业证如何办理一比一原版美国麻省大学波士顿分校毕业证如何办理
一比一原版美国麻省大学波士顿分校毕业证如何办理
 
eSIM and Virtual SIM Data Plans with GhostSims
eSIM and Virtual SIM Data Plans with GhostSimseSIM and Virtual SIM Data Plans with GhostSims
eSIM and Virtual SIM Data Plans with GhostSims
 
一比一原版美国宾州州立大学毕业证(psu学位证)如何办理
一比一原版美国宾州州立大学毕业证(psu学位证)如何办理一比一原版美国宾州州立大学毕业证(psu学位证)如何办理
一比一原版美国宾州州立大学毕业证(psu学位证)如何办理
 
How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...
How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...
How a Second-hand/Pre-owned iPhone Becomes a Certified Premium Refurbished iP...
 
一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理
一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理
一比一原版(hertfordshire毕业证书)赫特福德大学毕业证如何办理
 

Ash Furrow, Functional programming in swift

  • 1. the f&t&re of functional programming on iOS Ash Furrow, Artsy
  • 2.
  • 4. Closures Functional patterns Concise syntax Native Collections Operator overloading Namespaces Tuples Clear mutability syntax Interactive playground Multiple return types Generics Protocols and extensions on structs Pattern matching Fast iteration Optional types Object orientation Type inference Read-Eval-Print-Loop (REPL) Compile to native code
  • 5. Closures Functional patterns Concise syntax Native Collections Operator overloading Namespaces Tuples Clear mutability syntax Interactive playground Multiple return types Generics Protocols and extensions on structs Pattern matching Fast iteration Optional types Object orientation Type inference Read-Eval-Print-Loop (REPL) Compile to native code
  • 6. Closures Functional patterns Concise syntax Native Collections Operator overloading Namespaces Tuples Clear mutability syntax Interactive playground Multiple return types Generics Protocols and extensions on structs Pattern matching Fast iteration Optional types Object orientation Type inference Read-Eval-Print-Loop (REPL) Compile to native code
  • 8.
  • 9. It will not be we make apps for the WATCH 5 and the other future iOS devices. It will be a group of developers very much like us. But with more of our strengths and fewer of our weaknesses. More confident, far-seeing, and capable of using functional paradigms. For all of our failings, despite our limitations and fallibilities, we developers are capable of greatness. —Carl Sagan
  • 10. 1. Imperative prog5amming is old and busted 2. Functional prog5amming is the new ho?@ess 3. Ge?ing starCed with f&nctional prog5amming in Swiſt is super-­‐easy
  • 12. ANDA MASK ;AND A with Mask BNE ADD1 BRA NONE1 ADD1 INY ;increment our counter of 1's NONE1 LDAA TEMP ;reload accumulator A LSL MASK ;Shift the mask's 1 bit left BNE LOOP1 ;If we haven't finished our loop, branch LDAA #$01 ;load new mask into A STAA MASK ;store the reset mask into MASK TSX ;pull of return address and store in X PULA ;pull off A STAA TEMP ;store the value into temp TXS ;push return address back onto the stack LOOP2 LDAA TEMP ;Load A into TEMP ANDA MASK ;logical AND MASK with A BNE ADD2 ;add one if we need to BRA NONE2 ADD2 INY ;increment our counter of 1's NONE2 LDAA TEMP LSL MASK ;shift our mask left by one BNE LOOP2 ;loop back until we've exhausted positions
  • 14. functional programming • It’s been around forever • But only in universities (ew)
  • 15. what is functional programming? • Treat computation as the result of functions • Avoid mutable state and data
  • 16. f&nctional prog5amming tells the computer instead of what to do how to do it
  • 17. getting started is super-easy
  • 20. resources • Books • Blogs • GitHub • ReactiveCocoa • LlamaKit • Stack Overflow • Tweet me
  • 23. 1. Imperative prog5amming is old and busted 2. Functional prog5amming is the new ho?@ess 3. Ge?ing starCed with f&nctional prog5amming in Swiſt is super-­‐easy
  • 24. so where now? • Swift promised functional patterns • Failed to deliver • Community is picking up the slack