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
110
0
Share
De volta ao Futuro do JS: As próximas features e propostas incríveis
Willian Martins
August 08, 2020
More Decks by Willian Martins
See All by Willian Martins
Empirical Observations on the The Future of Scalable UI Architecture
wmsbill
0
160
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
880
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
140
A, B, C. 1, 2, 3. Iterables you and me.
wmsbill
0
110
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
140
Back to the future of JS.
wmsbill
0
11
Node conf ar 2018.
wmsbill
0
650
Back to the future of JS
wmsbill
1
91
Back to the future of JS
wmsbill
2
290
Other Decks in Technology
See All in Technology
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
AI駆動開発でなんでもハンズオン環境をつくってみた
yoshimi0227
0
180
インフラが苦手でも大丈夫! 紙芝居 Kubernetes -WWGT 10周年編-
aoi1
1
310
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.7k
速さだけじゃない! VoidZero ツールが移行先に選ばれる理由
mizdra
PRO
6
700
TROCCOで始めるクラウドコストを民主化するためのFinOps
tk3fftk
2
490
Agentic AI時代における メルカリのAIガバナンスとガードレール実装
naoichihara
17
17k
Databricks 月刊サービスアップデート 2026年05月号
tyosi1212
0
120
はじめてのDatadog
kairim0
0
240
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
340
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
420
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Code Reviewing Like a Champion
maltzj
528
40k
Building the Perfect Custom Keyboard
takai
2
780
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
380
4 Signs Your Business is Dying
shpigford
187
22k
Designing Powerful Visuals for Engaging Learning
tmiket
1
390
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
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
[email protected]
Valeus! Falows!