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
62
Other Decks in Technology
See All in Technology
めちゃくちゃ開発するQAエンジニアになって感じたメリットとこれからの課題感
ryuhei0000yamamoto
0
130
20260321_エンベディングってなに?RAGってなに?エンベディングの説明とGemini Embedding 2 の紹介
tsho
0
100
コンテキスト・ハーネスエンジニアリングの現在
hirosatogamo
PRO
4
510
It’s “Time” to use Temporal
sajikix
3
220
Claude Code Skills 勉強会 (DevelersIO向けに調整済み) / claude code skills for devio
masahirokawahara
1
22k
TypeScript 7.0の現在地と備え方
uhyo
7
1.8k
Tebiki Engineering Team Deck
tebiki
0
27k
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
200
Kubernetesにおける推論基盤
ry
1
420
20260311 ビジネスSWG活動報告(デジタルアイデンティティ人材育成推進WG Ph2 活動報告会)
oidfj
0
350
Sansanでの認証基盤内製化と移行
sansantech
PRO
0
590
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
280
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
Automating Front-end Workflow
addyosmani
1370
200k
How GitHub (no longer) Works
holman
316
150k
Building Applications with DynamoDB
mza
96
7k
KATA
mclloyd
PRO
35
15k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
310
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