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
29
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
78
Expressões Regulares
mendrone
0
36
Como escolher uma stack para meu projeto?
mendrone
0
26
Future Proof CSS - 2019
mendrone
0
76
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
83
Um Simples Checkup Pode Salvar a Sua Loja Virtual
mendrone
0
61
Other Decks in Technology
See All in Technology
primeNumber DATA MANAGEMENT CAMP #2:
masatoshi0205
1
630
APMの世界から見るOpenTelemetryのTraceの世界 / OpenTelemetry in the Java
soudai
PRO
0
200
LINE Messengerの次世代ストレージ選定
lycorptech_jp
PRO
3
2.1k
OCI技術資料 : 外部接続 VPN接続 詳細
ocise
1
10k
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.8k
AIエンジニア Devin と歩む、自律型運用プロセスの構築
a2ito
0
350
Interop Tokyo 2025 ShowNet Team Memberで学んだSRv6を基礎から丁寧に
miyukichi_ospf
0
250
Databricksアシスタントが自分で考えて動く時代に! エージェントモード体験もくもく会
taka_aki
0
210
Snowflake Night #2 LT
taromatsui_cccmkhd
0
270
ローカルでLLMを使ってみよう
kosmosebi
0
210
バニラVisaギフトカードを棄てるのは結構大変
meow_noisy
0
160
Claude Codeはレガシー移行でどこまで使えるのか?
ak2ie
1
1.1k
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
170
Designing Powerful Visuals for Engaging Learning
tmiket
0
250
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
95
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
170
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.7k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
The Curious Case for Waylosing
cassininazir
0
260
Tell your own story through comics
letsgokoyo
1
830
What's in a price? How to price your products and services
michaelherold
247
13k
Building Adaptive Systems
keathley
44
2.9k
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