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
22
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
75
Expressões Regulares
mendrone
0
32
Como escolher uma stack para meu projeto?
mendrone
0
18
Future Proof CSS - 2019
mendrone
0
72
Vue.js - O Antes, o Durante e o Depois
mendrone
0
100
Future Proof CSS
mendrone
1
96
High Speed Workflow
mendrone
4
140
Usabilidade - O bom senso é o seu melhor amigo
mendrone
0
80
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
58
Other Decks in Technology
See All in Technology
AI ReadyなData PlatformとしてのAutonomous Databaseアップデート
oracle4engineer
PRO
0
150
いまさら聞けない ABテスト入門
skmr2348
1
190
about #74462 go/token#FileSet
tomtwinkle
1
280
pprof vs runtime/trace (FlightRecorder)
task4233
0
150
SwiftUIのGeometryReaderとScrollViewを基礎から応用まで学び直す:設計と活用事例
fumiyasac0921
0
130
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
11
77k
生成AIを活用したZennの取り組み事例
ryosukeigarashi
0
190
KAGのLT会 #8 - 東京リージョンでGAしたAmazon Q in QuickSightを使って、報告用の資料を作ってみた
0air
0
200
それでも私はContextに値を詰めたい | Go Conference 2025 / go conference 2025 fill context
budougumi0617
4
1.2k
業務自動化プラットフォーム Google Agentspace に入門してみる #devio2025
maroon1st
0
180
許しとアジャイル
jnuank
1
100
Goに育てられ開発者向けセキュリティ事業を立ち上げた僕が今向き合う、AI × セキュリティの最前線 / Go Conference 2025
flatt_security
0
330
Featured
See All Featured
Making Projects Easy
brettharned
118
6.4k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Designing for Performance
lara
610
69k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Code Review Best Practice
trishagee
72
19k
Git: the NoSQL Database
bkeepers
PRO
431
66k
For a Future-Friendly Web
brad_frost
180
9.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
The Invisible Side of Design
smashingmag
301
51k
Six Lessons from altMBA
skipperchong
28
4k
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