Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Functional Programming in Swift
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
IOSdevelopersMx
March 10, 2016
Technology
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Functional Programming in Swift
IOSdevelopersMx
March 10, 2016
More Decks by IOSdevelopersMx
See All by IOSdevelopersMx
Functional programming vol 2
iosdevelopersmx
0
85
Construyendo vistas 100% por código VS usando AutoLayout
iosdevelopersmx
0
30
GraphQL como una nueva forma revolucionaria de pensar en las APIs!
iosdevelopersmx
0
35
Clean Architecture in IOS
iosdevelopersmx
1
110
Xamaring Bindings
iosdevelopersmx
0
53
StackViews
iosdevelopersmx
1
55
StoryboardReferences
iosdevelopersmx
0
59
Ibeacons Parte 1
iosdevelopersmx
0
55
Other Decks in Technology
See All in Technology
beyond jj: config & tools ecosystem
indirect
0
5.6k
2026-09-08 そのJavaモダナイゼーション、AIに丸投げで大丈夫?IBM Bobで変わる品質と効率
yutanonaka
1
110
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
140
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
120
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
400
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
2
260
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
230
絵ではじめるKubernetesセキュリティ
aoi1
4
690
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
290
Vibe Coding で作ったプロダクトをどう安全に動かすか / How to Safely Run Products Built with Vibe Coding
glidenote
0
430
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
170
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
1.1k
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
430
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
530
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Skip the Path - Find Your Career Trail
mkilby
1
230
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
How STYLIGHT went responsive
nonsquared
100
6.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Transcript
SWIFT PROGRAMACIÓN FUNCIONAL
— Un programador ¡OBJETIVE-C ESTÁ MUERTO! ” “
— El mismo programador ¡LARGA VIDA A SWIFT! ” “
— Otro programador LA PROGRAMACIÓN ORIENTADA A OBJETOS FUE UN
ERROR. ” “
— El mismo programador LA PROGRAMACIÓN FUNCIONAL ES MEJOR QUE
LA ORIENTADA A OBJETOS. ” “
— Apple ¡LA PROGRAMACIÓN ORIENTADA A PROTOCOLOS VA A CAMBIAR
TODO!. ” “
— Apple YA NO USEN CLASES, HERENCIA Y VALORES POR
REFERENCIAS ” “
¡ALTO!
¿QUÉ ES PROGRAMACIÓN FUNCIONAL?
¿QUÉ ES PROGRAMACIÓN ORIENTADA A OBJETOS?
¿QUÉ ES LO QUE REALMENTE IMPORTA?
CONTROLAR LA COMPLEJIDAD
¿CÓMO?
ENCAPSULAMIENTO AISLAMIENTO NO EFECTOS SECUNDARIOS ENTRADAS Y SALIDAS CONCEPTOS RELACIONADOS
UNIDAD DE PROCESAMIENTO 1 UNIDAD DE PROCESAMIENTO 2 UNIDAD DE
PROCESAMIENTO 3 ENTRADA SALIDA
GENERALES PROPIEDADES • Misma entrada, misma salida • No efectos
colaterales • Semánticamente no hay pase por referencia
¿POR QUÉ ES IMPORTANTE ESTO?
SI HAY EFECTOS COLATERALES EL CÓDIGO ES MAS DIFÍCIL DE
ENTENDER Y DE PROBAR
SI LAS FUNCIONES NO DEVUELVEN ALGO (SENTENCIAS), ES POR QUE
PRODUCEN EFECTOS COLATERALES (CAMBIAN ALGO EXTERNO O ESTADO INTERNO)
CARACTERÍSTICAS FUNCIONES EN SWIFT • Funciones son un tipo de
dato (First class) • Funciones de grado superior (funciones pueden recibir y devolver otras funciones)
VEAMOS ALGO DE CÓDIGO
RESUMEN DE OPCIONES Pase por Referencia Pase por Valor Mutable
Swift Objetive-C Swift Objetive-C Inmutable Erlang Elixir Swift
None
¿? ¿? ¿? ENTRADA SALIDA ¿QUÉ SON LOS CUADROS?
OBJETO 1 OBJETO 2 OBJETO 3 ENTRADA SALIDA ¿QUÉ SON
LOS CUADROS?
FUNCIÓN 1 FUNCIÓN 2 FUNCIÓN 3 ENTRADA SALIDA ¿QUÉ SON
LOS CUADROS?
None
None
RETOS FUNCIONAL • Imperativo vs Declarativo • Recursión vs Ciclos
TÉCNICAS OBJECTIVE-C • Implicit sharing • Inheritance - Delegation •
Reference semantics • Immutability • Value Semantics • Defensive copying
SWIFT CONCLUSIONES • Swift es un lenguaje de programación híbrido
• Riesgo de mezclar/no usar correctamente ningún paradigma • OOP nunca ha tenido nada que ver con clases, herencia y mutabilidad
GENERALES CONCLUSIONES • Thread Safety • Reusability • Testability (Easier,
Faster, No dependencies, Concurrents) • Understandability • Maintainability • Composition
LINKS REFERENCIAS • http://www.sicpers.info/2015/05/object-oriented-programming-in- objective-c/Reusability • https://www.destroyallsoftware.com/talks/boundaries • https://developer.apple.com/videos/play/wwdc2015/226/ •
https://developer.apple.com/videos/play/wwdc2015/414/ • https://developer.apple.com/videos/play/wwdc2015/408/