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
33
Como escolher uma stack para meu projeto?
mendrone
0
25
Future Proof CSS - 2019
mendrone
0
73
Vue.js - O Antes, o Durante e o Depois
mendrone
0
110
Future Proof CSS
mendrone
1
100
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
Qiita Bash アドカレ LT #1
okaru
0
170
SES向け、生成AI時代におけるエンジニアリングとセキュリティ
longbowxxx
0
300
Digitization部 紹介資料
sansan33
PRO
1
6.4k
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
430
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
202512_AIoT.pdf
iotcomjpadmin
0
180
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
Keynoteから見るAWSの頭の中
nrinetcom
PRO
1
170
自己管理型チームと個人のセルフマネジメント 〜モチベーション編〜
kakehashi
PRO
5
2.2k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
0
140
善意の活動は、なぜ続かなくなるのか ーふりかえりが"構造を変える判断"になった半年間ー
matsukurou
0
320
AI との良い付き合い方を僕らは誰も知らない (WSS 2026 静岡版)
asei
1
240
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
59
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Optimizing for Happiness
mojombo
379
70k
ラッコキーワード サービス紹介資料
rakko
0
1.9M
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
The browser strikes back
jonoalderson
0
300
The Language of Interfaces
destraynor
162
26k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
2
78
Accessibility Awareness
sabderemane
0
32
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
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