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
Desmistificando Herança e Protótipos no JS - Short
Search
Lucas Santos
June 04, 2020
Programming
1
170
Desmistificando Herança e Protótipos no JS - Short
Lucas Santos
June 04, 2020
Tweet
Share
More Decks by Lucas Santos
See All by Lucas Santos
The Hitchhiker's Guide for an Amazing API with TypeScript
khaosdoctor
0
100
Escalando globalmente com TypeScript e JavaScript na Klarna
khaosdoctor
0
190
The future of JavaScript
khaosdoctor
0
60
TypeScript tips that could save your life
khaosdoctor
0
210
É hora de falar sobre Deno
khaosdoctor
0
77
JS Software testing for beginners
khaosdoctor
0
85
Ambientes dinâmicos com GitHub Actions
khaosdoctor
0
42
The Dark Side of JavaScript
khaosdoctor
0
79
Integrating Containers Into JavaScript
khaosdoctor
0
70
Other Decks in Programming
See All in Programming
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
610
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
920
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
690
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.5k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
680
CSC307 Lecture 01
javiergs
PRO
0
640
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
530
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
550
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
150
Deno Tunnel を使ってみた話
kamekyame
0
280
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
210
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
39
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
How STYLIGHT went responsive
nonsquared
100
6k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
240
Designing for Timeless Needs
cassininazir
0
110
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Building the Perfect Custom Keyboard
takai
1
670
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
36
Facilitating Awesome Meetings
lara
57
6.7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
74
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
120
Transcript
Desmistificando Herança e Prototypes no Javascript Sempre esteve lá, ninguém
sabia o porquê
$ whoami Lucas Santos /khaosdoctor @_staticvoid lsantos.me Cloud Advocate
[email protected]
@khaosdoctor
trainingcenter.io 2018.abcdevelopers.org
O.O.P
Encapsulamento
None
None
Polimorfismo
None
Arrow functions não vão funcionar
????????
Herança
Herança nos dá isso
Herança nos dá isso De onde veio isso?
De onde as coisas vem?
Tipos originais De onde tudo aparece
Array()
Function()
Object()
String Number Object Array Func RegExp
None
Como elas funcionam?
None
__proto__
Nunca toque no __proto__
Object.Prototype Não. Não é a mesma coisa
Prototype é um objeto de propriedades
O famoso “new”
Instâncias
Instâncias
Instâncias
Instâncias
Instâncias
Herança! Mas não é qualquer herança...
Herança Prototípica
Herança Prototípica
Instâncias
Cadeias de protótipos Como eu sei o que eu quero?
Cadeias de protótipos
Cadeias de protótipos
Cadeias de protótipos
Cadeia de protótipos
Cadeia de protótipos
Cadeias de protótipos: a prática
O fim da cadeia
O fim da cadeia?
E o “extends”?
Extends
Extends
Extends: Exemplo
Extends
O que eu faço com isso?
1. Métodos globais
2. Overload
2. Overload - Os problemas
None
3. Performance
3. Performance .print
3. Performance
3. Performance
Referências - bit.ly/medium-prototypes - bit.ly/ecma-proto - mzl.la/mdn-proto - mzl.la/function-js -
mzl.la/extends-jsx - bit.ly/encapsulamento-js - bit.ly/polimorfismo-js - bit.ly/this-js - bit.ly/imasters-smoosh
/khaosdoctor @_staticvoid lsantos.me @khaosdoctor