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
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
AIに攻撃される前に、AIに攻撃させる
tsuchikazu
0
160
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
630
今こそ知りたいAmplifyGen2
mkdev10
2
160
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
1k
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
110
しろおびから始める!ログ活用の第一歩
shumei_ito
0
800
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
1.8k
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
890
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
510
Google Cloud Next Tokyo 26登壇時のスクリプト
recruitengineers
PRO
0
210
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
220
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
140
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Raft: Consensus for Rubyists
vanstee
142
7.7k
Odyssey Design
rkendrick25
PRO
2
860
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Evolving SEO for Evolving Search Engines
ryanjones
0
310
So, you think you're a good person
axbom
PRO
2
2.2k
A designer walks into a library…
pauljervisheath
211
25k
Everyday Curiosity
cassininazir
0
350
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Code Review Best Practice
trishagee
74
20k
The Curse of the Amulet
leimatthew05
3
15k
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