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
35
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
81
Expressões Regulares
mendrone
0
40
Como escolher uma stack para meu projeto?
mendrone
0
29
Future Proof CSS - 2019
mendrone
0
78
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
88
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
68
Other Decks in Technology
See All in Technology
Directions Asia 2026 | Beyond Buildable AI Agents: Let’s Visualize Partner Value in the AI Era
ryoheig0405
0
100
Terragrunt x Snowflake + dbt で作るマルチテナントなデータ基盤構築プラットフォーム
gak_t12
0
430
業務に残された「良くない型」で考える「TypeScriptの難しさ」
sajikix
1
370
ESP32 IoTを動かしながらメモリ使用量を観測してみた話
zozotech
PRO
0
140
AI 時代の Platform Engineering
recruitengineers
PRO
1
220
おいらのAWSアップデートの追い方〜Slack×AgentCore〜
yakumo
1
110
サイボウズ、プラットフォームエンジニアリング始めるってよ ― プラットフォームチームの事業貢献と組織アラインメントの強化
ueokande
0
120
インプロセスQAのための要因から捉えるプロジェクトリスクマネジメントnano #1 開発リソース効率状態への対処 #jasstnano
barus_qa
0
170
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
1k
AI飲み会幹事エージェントを作っただけなのに
ykimi
0
230
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
490
10サービス以上のメール到達率改善を地道に継続的に進めている話 / Continue to improve email delivery rates across multiple services
yamaguchitk333
6
2.1k
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Believing is Seeing
oripsolob
1
130
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Everyday Curiosity
cassininazir
0
210
Raft: Consensus for Rubyists
vanstee
141
7.4k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
220
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
540
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Designing for Timeless Needs
cassininazir
1
220
The Curse of the Amulet
leimatthew05
1
12k
HDC tutorial
michielstock
2
660
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