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
47
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
Transcript
60 slides
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
More Decks by Vitor Mendrone
See All by Vitor Mendrone
Como se tornar indispensável em um mercado em crise?
mendrone
0
91
Expressões Regulares
mendrone
0
57
Como escolher uma stack para meu projeto?
mendrone
0
36
Future Proof CSS - 2019
mendrone
0
87
Vue.js - O Antes, o Durante e o Depois
mendrone
0
130
Future Proof CSS
mendrone
1
140
High Speed Workflow
mendrone
4
160
Usabilidade - O bom senso é o seu melhor amigo
mendrone
0
98
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
87
Other Decks in Technology
See All in Technology
AIエージェントのアーキテクチャ設計
nsatoh
0
550
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
1
360
AWS Blocksで AIエージェント作れるの知ってます?
kmiya84377
1
170
NutanixへのSSHアクセスの今後について
shadowhat
0
180
設計手法を「道具」として使いこなすために
a_suenami
7
1.8k
お風呂場をサーバルームにしよう
yusuke427
0
400
gradle-best-practices 使ってみた
mikanichinose
0
230
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
510
デザインシステムのフィードバックループをほぼ自動化した話
tongari07
0
390
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
コーディングできない僕にBobが舞い降りた
shumpei3
0
210
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
500
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Code Review Best Practice
trishagee
74
20k
GraphQLとの向き合い方2022年版
quramy
50
15k
The agentic SEO stack - context over prompts
schlessera
0
1k
The Limits of Empathy - UXLibs8
cassininazir
2
800
Visualization
eitanlees
153
17k
Designing for Performance
lara
612
70k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
600
A Modern Web Designer's Workflow
chriscoyier
699
190k