►
From YouTube: Tildot: Notational support for Promise Pipelining in JS
Description
Presented at TC39 Oct 2019. https://github.com/tc39/proposal-wavy-dot
Achieved stage 1 status.
Slides: https://github.com/tc39/agendas/blob/master/2019/10.eventual-op-as-recorded.pdf
This proposal is to investigate notational support for promise pipelining. The concrete syntax we’re starting with is the “~.”, chosen by analogy with the optional chaining operator “?.”. Both can be thought of as “_adjective_ dot”, i.e., like dot but different somehow. For ~. The difference is that the operation is performed eventually and possibly remotely.
A
A
Unfortunately,
a
Twitter
poll
was
conducted
and
in
which
tell
dot
was
the
winning
term,
but
in
anticipation
of
you
who
does
question,
I
want
to
say
that
the
actual
topic
to
be
proposed
for
stage
one
that
I'm
proposing
for
stage
one
is
to
investigate
not
this
particular
concrete,
syntax
or
even
necessarily
adding
syntax
but
the,
but
the
the
investigation
that
I
want
to
go
forward
in
stage.
One
is
Pleasant
notation
for
promise
pipeline,
basically
Pleasant
notation
for
actually
doing
the
things
that
the
previous
proposal
makes
possible.
A
A
A
So,
let's
hypothesize
a
helper
called
R
that
returns
a
proxy
that
were
that,
so
that
we
can
then
use
the
intuitive
syntax
follow
following
the
proxy
just
dot
foo,
rather
than
wavy
dot.
Two
now
the
problem
is,
since
we
want
to
support
both
eventual
get
and
eventual
call
we're
left
with
a
dilemma.
What
should
our
of
B
dot
foo
return?
Well,
if
it's
an
eventual
we'll
get
that
we're
actually
interested
in
than
what
it
should
return,
is
a
promise
for
the
result
of
the
eventual
get.
A
If
what
we're
interested
in
if
proxies,
however,
cannot
distinguish
a
method
call
from
a
get
followed
by
a
function,
call
Tom
and
I.
Just
historical
note,
Tom
and
I
tried
several
times
to
enhance
the
handler
API
to
make
it
possible
for
proxies
to
distinguish
those
cases,
but
none
of
those
proposals
happened
and
it's
fundamentally
impossible
for
a
proxy
to
distinguish
those
cases.
A
So
if
the
RB
dot
foo
is,
is
the
first
part
of
a
method
call
that
we
want
to
follow
it
with
the
open,
paren
argument.
Syntax,
then,
what
it
needs
to
return
is
either
a
function
or
a
function:
proxy
and
there's
no
possible
value,
which
is
both
a
genuine
promise
and
a
function
or
a
function
proxy.
So
we're
left
with
the
dilemma
there,
a.
A
Way
to
solve
the
dilemma
is
that
have
our
FB
dot
foo
return
to
handle
promise
and
then
just
use
the
our
wrapper
again
to
turn
that
in
and
proxy,
after
which
we
can
use
normal
notation.
So
then,
the
these
proxies,
the
proxies
returned
by
our
could
always
be
function
proxies
so
that
they
could
always
accept
the
possibility
of
being
invoked
function.
Call
syntax,
in
which
case
the
notation
at
the
bottom
would
be
notation
for
an
eventual
method
call
without
introducing
new
syntax
into
the
language.
A
And
what
we're
actually
doing
at
a
goreck
is
we
are
using
a
different
proxy
helper
that
we
call
e
e
for
eventual.
That
is
just
an
alternative
to
the
line
above
so
you
could
imagine
that
you
have
multiple
proxy
helpers,
both
r
and
e,
where
e
just
gives
you
the
automated
method.
Call
syntax
and
r
gives
you
the
other
cases.
That
would
be
a
viable
solution
so
far,
but
then
the
other
thing
is
that
a
proxy
or
its
handler
cannot
detect
whether
the
result
will
be
ignored.
A
So
if
the
result
is
ignored,
then
you're
doing
a
bunch
of
extra
bookkeeping
to
produce
the
result
in
the
remote
calling
case
that
you
didn't
actually
need
and
it's
expensive
to
to
do.
The
unnecessary
bookkeeping.
I
should
also
go
back
to
the
to
the
double
are
case
that
that
one's
also
doing
extra
remote
bookkeeping,
because
now
you
have
to
do
the
bookkeeping
in
the
communications
protocol
to
thread
through
the
remote
reference
to
the
function
that
you're
locally
getting
a
function
proxy
for,
whereas
the
only
thing
you're
using
that
remote
function
for
is
to
call
it.
A
So
it
would
be
good
to
have
just
sent
over
the
entire
remote
call,
rather
than
doing
the
bookkeeping
to
receive
the
function.
Fortunately,
the
double
r
does
not
create
an
extra
round-trip
given
promise
pipeline
is
actually
a
very
nice
example.
Pipeline
is
important.
Is
we're
only
paying
for
extra
bookkeeping,
we're
not
paying
an
extra
round-trip
given
promised
pipeline.
A
So
categoric
we're
actually
experimenting
with
the
approach
that
you're,
that
that
this
are
versus
e
is
essentially
showing
of
having
multiple
proxy
handlers
proxy
helpers
to
distinguish
not
just
from
between
eventual
get
and
eventual
call,
but
also
distinguish
the
cases
about.
Are
we
ignoring
the
return
result?
You're,
not
so
with
a
whole
menagerie
of
these
things
and
Michael
Fink
also
has
a
different
way
of
providing
them.
A
We've
completely
explored
the
possibilities
of
proxy
helpers,
so
I
propose
that
this
proposal
going
forward
to
stage
one
continue
to
include
that
exploration,
is
in
bounds,
but
the
the
focus
of
this
proposal
is
still
what
it
would
take
to
be
a
pleasant
notation,
assuming
that
we
that
we
give
ourselves
the
option
to
add
syntax
and
the
concrete
syntax
are
proposing,
is
way
Vidocq
again.
The
idea
is
that
to
read
this
as
adjective
dot
in
the
same
way,
the
question
mark
dot
can
be
thought
of
as
adjective
dot.
A
It's
like
dot
in
many
ways,
but
different
in
a
particular
way,
and
also
the
the
notion
of
reading
both
of
them
is
adjectives.
Dot
also
suggests
how
they're
combined
is
if
each
of
them
are
understood
as
adjectives.
Not,
then
it's
not
surprising
if
there's
yet
another
token
added
to
the
language,
which
is
either
till
the
question,
mark
dot
or
dot.
Question
mark
Tilton
art.
You
know
what
I
mean
a
question:
mark
tilde,
dot
or
or
tilde
question
mark
dot.
A
And
this
would
be
essentially
the
abstract
syntax
that
we're
talking
about,
and
this
would
be
the
concrete
syntax
that
is
intended
to
have.
This
correspond,
rather
literally
to
the
Kotton
to
the
concrete
syntax
for
the
optional
training
proposal.
Question
mark
dot.
If
there's
a
discrepancy
between
what's
here
and
question
mark
dot,
that
discrepancy
should
probably
be
fixed.
A
But
the
intention
is
that
these
these
things
are
all
the
same
kind
of
intuitive
extension
of
the
meaning
of
dot
and
the
syntactic
placement
of
dot
and,
like
question
mark
like
question
mark
dot,
they
also
apply
to
you
square
bracket
lookup
and
they
applied
to
function
call
and
they
apply
to
method
call
and
that's
it
and
I'll.
Take
questions.
Oh
I
will
stop,
recording
and
then
take
questions.
Roma.