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
Back to the future of JS
Search
Willian Martins
June 02, 2018
Technology
290
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Back to the future of JS
Slides form JSConf EU talk.
Willian Martins
June 02, 2018
More Decks by Willian Martins
See All by Willian Martins
Empirical Observations on the The Future of Scalable UI Architecture
wmsbill
0
170
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
880
De volta ao Futuro do JS: As próximas features e propostas incríveis
wmsbill
0
110
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
120
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
660
Back to the future of JS
wmsbill
1
93
Other Decks in Technology
See All in Technology
AI時代のコスト管理を考えよう〜明日から使える実践AWSノウハウ~
yoshimi0227
0
310
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
100
AI駆動開発を通して感じた、 AI時代のデザイナーの役割変化
whisaiyo
4
2.3k
2026TECHFRESH畢業分享會 - Lightning Talk - 打造精準高效的 MCP 設計模式與測試實務
line_developers_tw
PRO
0
1.3k
ACE-Step-1.5で見る 音楽生成AIのしくみと“破綻だけ直す”Retake機能の開発【zennfes spring 2026 登壇資料】
personabb
1
540
2026TECHFRESH畢業分享會 - AI 時代的人生存檔點
line_developers_tw
PRO
0
1.3k
脆弱性対応、どこで線を引くか
rymiyamoto
1
420
MUSUBI 田中裕一『AIと共に行う「しごとのリデザイン」- スモールバックオフィス編』AI Ops Lab #4
musubi
0
270
When Platform Engineering Meets GenAI
sucitw
0
130
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
160
iAEONの段階的リアーキテクト戦略 / iAEON's_Gradual_Re-architecture_Strategy
aeonpeople
0
230
自宅LLMの話
jacopen
1
650
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
230
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
370
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
We Have a Design System, Now What?
morganepeng
55
8.2k
Ethics towards AI in product and experience design
skipperchong
2
310
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
420
Site-Speed That Sticks
csswizardry
13
1.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Transcript
Hallo!
https://github.com/tc39/proposals
None
@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?
None
@wmsbill How to make this predictable? Reasoning the value of
this is tricky Function.prototype.bind Arrow function () => {}
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 Binary syntax
@wmsbill Unary 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?
@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
@wmsbill Partial application syntax
@wmsbill With arbitrary parameter
None
@wmsbill The . . . token Spread the unbound parameters
Useful when you want to bound first or last parameter
@wmsbill The . . . token
@wmsbill The . . . token
None
@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]
Dankeshön!