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
The Future of JavaScript
Search
dherman
April 20, 2012
Programming
8.6k
52
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Future of JavaScript
SFRails, 4/19/12
dherman
April 20, 2012
More Decks by dherman
See All by dherman
Rust + Node = Neon
dherman
1
380
Evolving the World's Most Popular Programming Language
dherman
0
720
Closing iterators
dherman
0
840
A better future for comprehensions
dherman
0
2.1k
Evolution is Awesome
dherman
0
680
Status Report: ES6 Modules
dherman
16
4.1k
Discussion with TC39 about the semantics of symbols
dherman
1
450
September 2013 Modules Status Update
dherman
2
1.3k
Rust: low-level programming without the segfaults
dherman
13
9.1k
Other Decks in Programming
See All in Programming
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
200
New "Type" system on PicoRuby
pocke
1
980
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
180
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.8k
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
160
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
370
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
Featured
See All Featured
Leo the Paperboy
mayatellez
7
1.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
850
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Scaling GitHub
holman
464
140k
So, you think you're a good person
axbom
PRO
2
2.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Curious Case for Waylosing
cassininazir
1
390
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Transcript
THE FUTURE => OF JAVASCRIPT Dave Herman
Hi, I’m dherman @littlecalculist
I — JavaScript and I love the language it almost
is...
None
None
modules • block scoping • generators • proxies • binary
data • destructuring • rest-args & defaults • name objects • custom iteration • comprehensions • string templates • hash tables & weak maps • class syntax • full Unicode • function/object shorthands tl;dr:
Great libraries need modules
var Collections = (function() { function Dict()
{ ... } return { Dict: Dict }; })();
None
browser <script></script>
“The human compiler, at work.” — Paul Graham “The sincerest
form of feature request.” — someone?
module Collections { export function Dict() {
... } }
import { $ } from "jquery.js"; import { map, each
} from "underscore.js";
import { $ } from "jquery.js"; import { map, each
} from "underscore.js"; loaded once, before execution
Generators cleaning up callback spaghetti
XHR("foo.txt", function(foo) { XHR("bar.txt", function(bar) {
XHR("baz.txt", function(baz) { setTimeout(function() { status.innerHTML = foo + bar + baz; }, 1000); }); }); });
XHR("foo.txt", function(foo) { XHR("bar.txt", function(bar) {
XHR("baz.txt", function(baz) { setTimeout(function() { status.innerHTML = foo + bar + baz; }, 1000); }); }); }); pyramid of doom
function onTimeout(foo, bar, baz) { status.innerHTML =
foo + bar + baz; } XHR("foo.txt", function(foo) { XHR("bar.txt", function(bar) { XHR("baz.txt", function(baz) { setTimeout(function() { onTimeout(foo, bar, baz); }, 1000); }); }); });
function onTimeout(foo, bar, baz) { status.innerHTML =
foo + bar + baz; } function onBaz(foo, bar, baz) { setTimeout(function() { onTimeout(foo, bar, baz); }, 1000); } XHR("foo.txt", function(foo) { XHR("bar.txt", function(bar) { XHR("baz.txt", function(baz) { onBaz(foo, bar, baz); }); }); });
function onTimeout(foo, bar, baz) { status.innerHTML =
foo + bar + baz; } function onBaz(foo, bar, baz) { setTimeout(function() { onTimeout(foo, bar, baz); }, 1000); } function onBar(foo, bar) { XHR("baz.txt", function(baz) { onBaz(foo, bar, baz); }); } XHR("foo.txt", function(foo) { XHR("bar.txt", function(bar) { onBar(foo, bar); }); });
function onTimeout(foo, bar, baz) { status.innerHTML =
foo + bar + baz; } function onBaz(foo, bar, baz) { setTimeout(function() { onTimeout(foo, bar, baz); }, 1000); } function onBar(foo, bar) { XHR("baz.txt", function(baz) { onBaz(foo, bar, baz); }); } function onFoo(foo) { XHR("bar.txt", function(bar) { onBar(foo, bar); }); } XHR("foo.txt", onFoo);
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.
spawn(function*() { var foo = yield read("foo.txt"),
bar = yield read("bar.txt"), baz = yield read("baz.txt"); yield sleep(1000); status.innerHTML = foo + bar + baz; }); promise
Binary data efficient memory layout and I/O
var Point2D = struct({ x: uint32,
y: uint32 }); var Color = struct({ r: uint8, g: uint8, b: uint8 });
var Pixel = struct({ point: Point2D,
color: Color }); var Triangle = array(Pixel, 3);
new Triangle([ { point: { x: 0,
y: 0 }, color: { r: 255, g: 255, b: 255 } }, { point: { x: 5, y: 5 }, color: { r: 128, g: 0, b: 0 } }, { point: { x: 10, y: 0 }, color: { r: 0, g: 0, b: 128 } } ])
Name objects first-class, unique property keys
function Container() { var secret = 3;
this.service = function() { if (secret-‐-‐) { ... } }; }
var key = new Name("secret"); function Container() { this[key] =
3 } Container.prototype = { service: function() { if (this[key]-‐-‐) { ... } } };
Familiar friends… should be no surprise for Rubyists
Destructuring: var [x, y] = getPair(); Parameter defaults: function(x=0, y=0)
{ } Rest/splat: function(...args) { return args } Iterators: for (x of keys(obj)) { } String interpolation: `Hello ${username}!`
The bigger picture…
“Be a better language for: a. complex apps b. libraries
c. code generators”
Motivated by use cases. Solve with simple, general, composable features.
Pieces have to fit together in a cohesive whole.
study the issues study the big picture study the issues
again study the big picture again study the issues again SHIP IT!
Work in the open wiki.ecmascript.org
[email protected]
Work in the open wiki.ecmascript.org
[email protected]
Thank you.