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 e propostas incríveis
Search
Willian Martins
August 08, 2020
Technology
0
58
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
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
750
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
74
A, B, C. 1, 2, 3. Iterables you and me.
wmsbill
0
66
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
76
Back to the future of JS.
wmsbill
0
11
Node conf ar 2018.
wmsbill
0
340
Back to the future of JS
wmsbill
1
42
Back to the future of JS
wmsbill
2
240
WebAssembly in NodeJS
wmsbill
4
540
Other Decks in Technology
See All in Technology
多言語化対応における TypeScript の型定義を通して開発のしやすさについて考えた / TSKaigi TypeScript Multilingualization
nabeliwo
2
380
エムスリーマルチデバイスチーム紹介資料 / Introduction of M3 Multi Device Team
m3_engineering
1
150
社内での継続的な機械学習勉強会の開催のコツ
yudai00
2
390
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
14
3.9k
QAエンジニアが伝えたい品質保証の羅針盤 / Compass for Quality Assurance
mii3king
1
330
Step by Stepで学ぶ、ADT(代数的データ型)、モナドからEffect-TSまで
leveragestech
1
2.9k
TDD - Test Driven Drupal
opdavies
0
3k
パフォーマンス最適化のベストプラクティス
databricksjapan
0
200
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
16
6.7k
Cloudflare WorkersがPythonに対応したので試してみた
miura55
0
190
Observabilityジャーニーを実現するためのAWSサービス:CloudWatch編
o11yfes2023
0
140
PHP 9 に備えよ - 動的プロパティ、どうすればいぃ?
taisukearase
0
300
Featured
See All Featured
A Philosophy of Restraint
colly
197
16k
Producing Creativity
orderedlist
PRO
338
39k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Rebuilding a faster, lazier Slack
samanthasiow
74
8.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
67
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
Documentation Writing (for coders)
carmenintech
60
4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
A better future with KSS
kneath
231
16k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
A Modern Web Designer's Workflow
chriscoyier
689
190k
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!