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
2
250
Back to the future of JS
Slides form JSConf EU talk.
Willian Martins
June 02, 2018
Tweet
Share
More Decks by Willian Martins
See All by Willian Martins
Empirical Observations on the The Future of Scalable UI Architecture
wmsbill
0
130
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
820
De volta ao Futuro do JS: As próximas features e propostas incríveis
wmsbill
0
73
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
91
A, B, C. 1, 2, 3. Iterables you and me.
wmsbill
0
73
Back to the future of JS II: Beyond what we can foresee
wmsbill
0
82
Back to the future of JS.
wmsbill
0
11
Node conf ar 2018.
wmsbill
0
450
Back to the future of JS
wmsbill
1
49
Other Decks in Technology
See All in Technology
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
なぜCodeceptJSを選んだか
goataka
0
160
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
100
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
170
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
160
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
720
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
ハイテク休憩
sat
PRO
2
140
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
230
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
480
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Building Applications with DynamoDB
mza
91
6.1k
Code Reviewing Like a Champion
maltzj
520
39k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
For a Future-Friendly Web
brad_frost
175
9.4k
Code Review Best Practice
trishagee
65
17k
Building Adaptive Systems
keathley
38
2.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
KATA
mclloyd
29
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
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!