Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Node conf ar 2018.
Search
Willian Martins
October 19, 2018
Technology
670
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Node conf ar 2018.
Willian Martins
October 19, 2018
Transcript
78 slides
¡Hola!
https://github.com/tc39/proposals
v. NodeConf Ar
@wmsbill What is this?
@wmsbill this in the global scope Browser - window Web
worker - self NodeJS - module.exports
@wmsbill this inside a function?
@wmsbill this inside a function?
@wmsbill What is this?
@wmsbill What is this?
@wmsbill this inside a function Browser - window NodeJS -
global object
@wmsbill this with new operator
@wmsbill this with new operator
@wmsbill this with strict mode
@wmsbill this with strict mode
@wmsbill Setting this value Function.prototype.call Function.prototype.apply Function.prototype.bind new operator Object
member function
@wmsbill Setting this value
@wmsbill How to make this predictable? Reasoning the value of
this is tricky Function.prototype.bind Arrow function () => {}
None
With .bind()
With Arrow
@wmsbill Calling a knowing function
@wmsbill Extracting a method from an object
None
@wmsbill Two syntaxes Unary : :context.method() Binary context: :method()
@wmsbill Unary syntax
@wmsbill Binary syntax
@wmsbill
@wmsbill
@wmsbill
@wmsbill Bind operator is good for virtual methods But relies
on this to be bound
@wmsbill Composing without this
@wmsbill
@wmsbill
None
@wmsbill Pipeline operator |> It is a syntax sugar for
function composition It creates a way to streamline a chain of functions
@wmsbill Pipeline operator |>
@wmsbill
@wmsbill
@wmsbill
@wmsbill Function with more params
@wmsbill Function with more params
@wmsbill Awaiting a function
@wmsbill Awaiting a function
@wmsbill Awaiting a function
@wmsbill Awaiting a function
@wmsbill Awaiting a function
None
@wmsbill Smart pipeline
@wmsbill Smart pipeline Two types bare style and topic style
() or [] are disallowed in bare style When () or [] is needed, topic style is used # token is subject to change
@wmsbill What about curry?
None
@wmsbill F# pipeline proposal Extends the minimal proposal with an
await step Await step waits for the resolution of the previous step
@wmsbill F# pipeline proposal
@wmsbill
@wmsbill Partial application f(…) arity = n; partialapp(f(…)) arity =
m; m < n
@wmsbill
@wmsbill
@wmsbill Partial application in ES Achievable by Function.prototype.bind .bind() binds
context and parameters
@wmsbill
@wmsbill What about currying? We can achieve partial application with
curry Curry ≠ Partial application Curry returns arity n-1
@wmsbill
@wmsbill Partial application with arrow function
None
@wmsbill Partial application proposal Creates two new parameters tokens ?
For single argument . . . for multiple parameters (not in the initial spec anymore)
@wmsbill Partial application syntax
@wmsbill With arbitrary parameter
None
@wmsbill Partial application in template string
@wmsbill Partial application in template string
None
@wmsbill The . . . token Spread the unbound parameters
Useful when you want to bound first or last parameter
@wmsbill The . . . token
@wmsbill The . . . token
@wmsbill Partial application + pipeline
@wmsbill Partial application + pipeline
@wmsbill Should I use all of it in production? These
proposal are in very early stage The adoption of one, may change the syntax/semantics of other Not production ready (yet)
https://medium.com/@wmsbill https://twitter.com/wmsbill
[email protected]
https://www.smashingmagazine.com/2018/10/taming-this-javascript-bind- operator/
¡Gracias!
More Decks by Willian Martins
See All by Willian Martins
Empirical Observations on the The Future of Scalable UI Architecture
wmsbill
0
180
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
900
De volta ao Futuro do JS: As próximas features e propostas incríveis
wmsbill
0
120
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
150
A, B, C. 1, 2, 3. Iterables you and me.
wmsbill
0
140
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
150
Back to the future of JS.
wmsbill
0
11
Back to the future of JS
wmsbill
1
100
Back to the future of JS
wmsbill
2
300
Other Decks in Technology
See All in Technology
Context Ontology Accelerator 入門 (業務データの意味を、AI エージェントに渡す)
inariku
PRO
3
670
Quick Automate | 目指せ Quick マスター 12
inariku
PRO
1
110
狙われているAPIの脆弱性!今こそ手をつけるべき根本的な対策とは?
nagix
0
130
JAWS_FESTA2026_オンプレ-AWS間プロキシサーバの移行_性能_障害対応で得た実践ノウハウ_高島一晃.pdf
tkazuaki0820
1
120
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
430
AIが会計業務の伴走者に。 マネーフォワード クラウド会計MCPサーバーで実現するAI前提の新しい業務プロセス
nobitabashi
0
120
Claude Codeで作ったアプリを安全に公開する/Built with Claude Japan 2026
yoshidashingo
0
240
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
6
1.7k
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
290
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
0
470
Sonnetだけで業務はまわる?
kintotechdev
1
110
仕様と現実の間で落とし所を探るリモートMCPの認証・認可 — Sansanの認証基盤における課題と実践
sansantech
PRO
2
290
Featured
See All Featured
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
48k
Designing Experiences People Love
moore
143
24k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Claude Code のすすめ
schroneko
67
230k
Raft: Consensus for Rubyists
vanstee
143
7.9k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Side Projects
sachag
456
43k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
520
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
980