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
A arte da composição
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Vitor Mendrone
November 30, 2019
Technology
43
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A arte da composição
Vitor Mendrone
November 30, 2019
More Decks by Vitor Mendrone
See All by Vitor Mendrone
Como se tornar indispensável em um mercado em crise?
mendrone
0
86
Expressões Regulares
mendrone
0
51
Como escolher uma stack para meu projeto?
mendrone
0
34
Future Proof CSS - 2019
mendrone
0
80
Vue.js - O Antes, o Durante e o Depois
mendrone
0
130
Future Proof CSS
mendrone
1
130
High Speed Workflow
mendrone
4
150
Usabilidade - O bom senso é o seu melhor amigo
mendrone
0
94
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
81
Other Decks in Technology
See All in Technology
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
140
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
0
200
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
290
Deep Data Security 機能解説
oracle4engineer
PRO
2
740
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
150
自分で立ててみるLLMサービス
y_sera15
0
150
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
770
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.2k
Codex概要
ymiya55
0
490
おそらく日本で唯一のDevRelインターン生として
husengs7
0
170
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
380
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
650
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
720
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Paper Plane
katiecoart
PRO
4
54k
The Limits of Empathy - UXLibs8
cassininazir
2
710
Statistics for Hackers
jakevdp
799
230k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Faster Mobile Websites
deanohume
310
32k
The Language of Interfaces
destraynor
162
27k
Between Models and Reality
mayunak
4
490
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Transcript
None
Vitor Mendrone Senior Developer @ Work & Co @vhmendrone
Disclaimer
+ Explicito + Genérico
Que argumentos essa função aceita? Que valores ela retorna? Quais
dados externos são necessários?
None
None
None
None
None
None
None
None
A arte da composição
Composição é a essência da programação.
Problema Decomposição Solução Recomposição / Composição
Composição é a alma da programação funcional.
None
Hype?
OOP (Object Oriented Programming) não oferece uma maneira satisfatória de
se resolver problemas atuais da computação multithread.
Concorrência e Paralelismo
Side Effects Tornam-se invisíveis Não escalam
O paradigma funcional oferece maior poder de abstração
O que é composição?
O ato de combinar partes ou elementos para formar um
todo. dictionary.com
Teoria de categorias
Categorias são a essência da composição Bartosz Milewski - Category
Theory for Programmers
Objetos e morfismos (ou arrows) entre esses objetos.
3 leis Composição Associatividade Identidade
Composição
None
None
None
Function composition
None
Function Composition + Typescript
FP-TS https://github.com/gcanti/fp-ts
Null Checks Exceptions Async Operations
Null Checks
None
None
Option Container Effect para o tipo opcional A Representa o
efeito de uma computação possivelmente com falha. Option<A>
None
None
None
None
Sem exceções
None
Either Um Option mais poderoso Valor existe: Right<R> Valor não
existe: Left<L> Either<L, R>
None
None
Stop making promises
None
Task Lazy evaluated e referencialmente transparente Task<A>
None
TaskEither Task<A> - Lazy e referencialmente transparente Either<L, R> TaskEither<L,
A>
None
Programação Funcional turbinada pela teoria de categorias nos fornece maneiras
de compor componentes (funções) de maneira concisa e agnóstica
Composições simples Flexíveis Robustas Fáceis de entender
Obrigado! @vhmendrone