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
0
25
A arte da composição
Vitor Mendrone
November 30, 2019
Tweet
Share
More Decks by Vitor Mendrone
See All by Vitor Mendrone
Como se tornar indispensável em um mercado em crise?
mendrone
0
76
Expressões Regulares
mendrone
0
35
Como escolher uma stack para meu projeto?
mendrone
0
25
Future Proof CSS - 2019
mendrone
0
74
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
81
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
60
Other Decks in Technology
See All in Technology
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
150
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
240
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
310
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
17k
AI駆動開発を事業のコアに置く
tasukuonizawa
1
250
Cosmos World Foundation Model Platform for Physical AI
takmin
0
930
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
320
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
250
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
HDC tutorial
michielstock
1
380
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Building Adaptive Systems
keathley
44
2.9k
Test your architecture with Archunit
thirion
1
2.2k
Skip the Path - Find Your Career Trail
mkilby
0
57
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to Ace a Technical Interview
jacobian
281
24k
Visualization
eitanlees
150
17k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
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