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
De volta ao Futuro do JS: As próximas features ...
Search
Willian Martins
August 08, 2020
Technology
0
81
De volta ao Futuro do JS: As próximas features e propostas incríveis
Willian Martins
August 08, 2020
Tweet
Share
More Decks by Willian Martins
See All by Willian Martins
Empirical Observations on the The Future of Scalable UI Architecture
wmsbill
0
140
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
840
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
99
A, B, C. 1, 2, 3. Iterables you and me.
wmsbill
0
83
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
90
Back to the future of JS.
wmsbill
0
11
Node conf ar 2018.
wmsbill
0
480
Back to the future of JS
wmsbill
1
58
Back to the future of JS
wmsbill
2
260
Other Decks in Technology
See All in Technology
困難を「一般解」で解く
fujiwara3
8
2.4k
アジリティを高めるテストマネジメント #QiitaQualityForward
makky_tyuyan
1
480
貧民的プログラミングのすすめ
kakehashi
PRO
2
190
【内製開発Summit 2025】イオンスマートテクノロジーの内製化組織の作り方/In-house-development-summit-AST
aeonpeople
2
1.2k
エンジニアのキャリアパスと、 その中で自分が大切にしていること
noteinc
3
740
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
27
17k
どちらかだけじゃもったいないかも? ECSとEKSを適材適所で併用するメリット、運用課題とそれらの対応について
tk3fftk
2
310
CSPMとのつきあい方
nantokanare
0
100
Platform Engineeringで クラウドの「楽しくない」を解消しよう
jacopen
4
230
エンジニアの健康管理術 / Engineer Health Management Techniques
y_sone
8
4.1k
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.9k
AIエージェント開発のノウハウと課題
pharma_x_tech
9
5.1k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1.1k
Building Adaptive Systems
keathley
40
2.4k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Building Applications with DynamoDB
mza
93
6.2k
How to train your dragon (web standard)
notwaldorf
91
5.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Transcript
E ai, Beleza?
Quem é você!?
Pq vc tá aqui?
https://github.com/tc39/proposals
BrazilJS - ES
@wmsbill O que é this?
@wmsbill this no escopo global Browser - window Web worker
- self NodeJS - module.exports
@wmsbill this dentro de uma função?
@wmsbill this dentro de uma função?
None
@wmsbill Como fazer this ser previsível? Entender o valor de
this é complicado Function.prototype.bind Arrow function () => {}
Com .bind()
Com Arrow
@wmsbill Invocando uma função conhecida
@wmsbill Extraindo um método de um objeto
None
@wmsbill Duas sintaxes Unária : :context.method() Binária context: :method()
@wmsbill Sintaxe unária
@wmsbill Sintaxe Binária
@wmsbill
@wmsbill
@wmsbill
@wmsbill Operador Bind é útil para métodos virtuais Mas precisa
que do this para ser travado
@wmsbill Compondo sem this
@wmsbill
@wmsbill
None
@wmsbill Operador pipeline |> Sintaxe sugar para composição de funções
Cria uma cadeia de funções fluida
@wmsbill Operador pipeline |>
@wmsbill
@wmsbill
@wmsbill
@wmsbill Função com mais de um parâmetro.
@wmsbill Função com mais de um parâmetro.
@wmsbill Awaiting uma função
@wmsbill Awaiting uma função
@wmsbill Awaiting uma função
@wmsbill Awaiting uma função
@wmsbill Awaiting uma função
None
@wmsbill Smart pipeline Dois tipos bare style e topic style
() e [] são proibidos no bare style Quando () ou [] é necessário, usa- se o topic style # é um token temporário
@wmsbill Smart pipeline
@wmsbill What about curry?
None
@wmsbill Proposta de pipeline F# Extende a proposta mínima com
o passo await O passo await espera pela resolução do passo anterior.
@wmsbill Proposta de pipeline F#
@wmsbill
@wmsbill Partial application f(…) aridade = n; partialapp(f(…)) aridade =
m; m < n
@wmsbill
@wmsbill
@wmsbill Partial application no JS Possível com Function.prototype.bind .bind() trava
contexto e parametros
@wmsbill
@wmsbill Mas e o currying? É possível fazer partial application
com curry Curry ≠ Partial application Curry retorna aridade n-1
@wmsbill
@wmsbill Partial application com arrow function
None
@wmsbill Proposta partial application Cria dois novos tokens de parametros
? Para argumento único . . . para múltiplos argumentos (não está mais na spec inicial)
@wmsbill Syntaxe do partial application
@wmsbill With arbitrary parameter
None
@wmsbill Partial application em template string
@wmsbill Partial application em template string
None
@wmsbill O token . . . Espalha os argumentos não
travados Útil quando se quer travar ou o primeiro ou o último parâmetro
@wmsbill O token . . .
@wmsbill O token . . .
@wmsbill Partial application + pipeline
@wmsbill Partial application + pipeline
@wmsbill Posso usar isso em produção? Essas propostas estão em
estágios muito iniciais A adoção de uma pode mudar ou eliminar a adoção de outra Não está pronta pra prod (ainda)
https://www.twitch.tv/williandev https://twitter.com/wmsbill ola@willian.dev
Valeus! Falows!