Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A arte da composição
Search
Vitor Mendrone
November 30, 2019
Technology
30
0
Share
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
78
Expressões Regulares
mendrone
0
36
Como escolher uma stack para meu projeto?
mendrone
0
26
Future Proof CSS - 2019
mendrone
0
76
Vue.js - O Antes, o Durante e o Depois
mendrone
0
110
Future Proof CSS
mendrone
1
110
High Speed Workflow
mendrone
4
140
Usabilidade - O bom senso é o seu melhor amigo
mendrone
0
84
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
63
Other Decks in Technology
See All in Technology
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
170
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
AWSで2番目にリリースされたサービスについてお話しします(諸説あります)
yama3133
0
110
Databricks Lakehouse Federationで 運用負荷ゼロのデータ連携
nek0128
0
110
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
170
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
140
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
180
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
130
CloudFrontのHost Header転送設定でパケットの中身はどう変わるのか?
nagisa53
1
250
ThetaOS - A Mythical Machine comes Alive
aslander
0
240
MIX AUDIO EN BROADCAST
ralpherick
0
140
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
Chasing Engaging Ingredients in Design
codingconduct
0
160
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
240
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
640
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Building the Perfect Custom Keyboard
takai
2
720
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
300
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
120
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
160
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
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