Callbacks: the new goto?
(well, no, but... still.)
Slide 17
Slide 17 text
Pour 1/2 cup water into pan.
When you’re done:
Bring water to boil.
When that’s done:
Lower heat and add rice.
After 15 minutes: Turn off heat and serve.
for
(x
in
[3,
4,
5])
//
0,
1,
2
(d’oh)
for
(x
of
[3,
4,
5])
//
3,
4,
5
for
(x
of
keys(o))
//
keys
in
o
for
(x
of
values(o))
//
values
of
o
for
([k,
v]
of
items(o))
//
props
of
o
Slide 41
Slide 41 text
import
iterate
from
"@iter";
obj[iterate]
=
function()
{
return
{
next:
function()
{
...
}
}
}
for
(x
of
obj)
{
...
}
Slide 42
Slide 42 text
[
x
*
y
for
(x
of
obj1)
for
(y
of
obj2)
]
Slide 43
Slide 43 text
"
\nohai,
"
+
firstName
+
"
"
+
lastName
+
"\n
"
Slide 44
Slide 44 text
`
ohai,
${firstName}
${lastName}
`
Slide 45
Slide 45 text
safeHTML`
ohai,
${firstName}
${lastName}
`
Slide 46
Slide 46 text
How soon is now?
Slide 47
Slide 47 text
We (Ecma) are working hard and fast on the spec.
We (vendors) will ship features before the spec is done.
Transpilers as language shims: Traceur, Narcissus