$30 off During Our Annual Pro Sale. View Details »
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
23
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
23
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
59
Other Decks in Technology
See All in Technology
Fashion×AI「似合う」を届けるためのWEARのAI戦略
zozotech
PRO
2
660
初めてのDatabricks AI/BI Genie
taka_aki
0
180
Kubernetes Multi-tenancy: Principles and Practices for Large Scale Internal Platforms
hhiroshell
0
120
AIの長期記憶と短期記憶の違いについてAgentCoreを例に深掘ってみた
yakumo
4
350
業務のトイルをバスターせよ 〜AI時代の生存戦略〜
staka121
PRO
2
200
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
790
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
160
Debugging Edge AI on Zephyr and Lessons Learned
iotengineer22
0
210
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
880
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
460
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
420
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
1
730
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Making Projects Easy
brettharned
120
6.5k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Bash Introduction
62gerente
615
210k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
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