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
88
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
850
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
110
A, B, C. 1, 2, 3. Iterables you and me.
wmsbill
0
88
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
98
Back to the future of JS.
wmsbill
0
11
Node conf ar 2018.
wmsbill
0
510
Back to the future of JS
wmsbill
1
66
Back to the future of JS
wmsbill
2
260
Other Decks in Technology
See All in Technology
AWSを利用する上で知っておきたい名前解決のはなし_彩の国埼玉支部#1
nagisa53
0
150
Microsoft の SSE の現在地
skmkzyk
0
280
Microsoft Fabric vs Databricks vs (Snowflake) -若手エンジニアがそれぞれの強みと違いを比較してみた- "A Young Engineer's Comparison of Their Strengths and Differences"
reireireijinjin6
1
130
より良い開発者体験を実現するために~開発初心者が感じた生成AIの可能性~
masakiokuda
0
230
コスト最適重視でAurora PostgreSQLのログ分析基盤を作ってみた #jawsug_tokyo
non97
1
860
genspark_presentation.pdf
haruki_uiru
0
160
CodeRabbitと過ごした1ヶ月 ─ AIコードレビュー導入で実感したチーム開発の進化
mitohato14
1
230
エンジニアリングで組織のアウトカムを最速で最大化する!
ham0215
1
280
Mastraに入門してみた ~AWS CDKを添えて~
tsukuboshi
0
380
GraphQLを活用したリアーキテクチャに対応するSLI/Oの再設計
coconala_engineer
0
200
社会人力と研究力ー博士号をキャリアの武器にするー
kentaro
2
100
C++26アップデート 2025-03
faithandbrave
0
1.2k
Featured
See All Featured
Building Applications with DynamoDB
mza
94
6.4k
How to train your dragon (web standard)
notwaldorf
91
6k
Practical Orchestrator
shlominoach
187
11k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
410
Writing Fast Ruby
sferik
628
61k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
830
Agile that works and the tools we love
rasmusluckow
329
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Adopting Sorbet at Scale
ufuk
76
9.3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Designing for Performance
lara
608
69k
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!