• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
ES.next
 

ES.next

on

  • 23,277 views

My part of the JSConf.us 2011 @jashkenas/@BrendanEich session

My part of the JSConf.us 2011 @jashkenas/@BrendanEich session

Statistics

Views

Total Views
23,277
Views on SlideShare
21,901
Embed Views
1,376

Actions

Likes
18
Downloads
88
Comments
1

5 Embeds 1,376

http://ontwik.com 1051
http://lanyrd.com 179
http://video-it.pl 138
url_unknown 7
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    ES.next ES.next Presentation Transcript

    • CoffeeScript, ES.next, the JS Language Lab mozilla 1Wednesday, May 4, 2011
    • What you should expect in the Future mozilla 2Wednesday, May 4, 2011
    • What you should expect in the Future • “No fate but what we make.” - Sarah Connor, T2 mozilla 2Wednesday, May 4, 2011
    • What you should expect in the Future • “No fate but what we make.” - Sarah Connor, T2 • “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee mozilla 2Wednesday, May 4, 2011
    • What you should expect in the Future • “No fate but what we make.” - Sarah Connor, T2 • “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee • How to invent the future: mozilla 2Wednesday, May 4, 2011
    • What you should expect in the Future • “No fate but what we make.” - Sarah Connor, T2 • “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee • How to invent the future: • CoffeeScript (and all the languages targeting JS) mozilla 2Wednesday, May 4, 2011
    • What you should expect in the Future • “No fate but what we make.” - Sarah Connor, T2 • “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee • How to invent the future: • CoffeeScript (and all the languages targeting JS) • Compile ES.next -> JS of today with a Harmonizr mozilla 2Wednesday, May 4, 2011
    • What you should expect in the Future • “No fate but what we make.” - Sarah Connor, T2 • “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee • How to invent the future: • CoffeeScript (and all the languages targeting JS) • Compile ES.next -> JS of today with a Harmonizr • Keep iterating... mozilla 2Wednesday, May 4, 2011
    • The Harmony goals mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications • code generators targeting the new edition mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications • code generators targeting the new edition • Better tests, if not a testable (executable) specification mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications • code generators targeting the new edition • Better tests, if not a testable (executable) specification • Adopt de facto standards where possible mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications • code generators targeting the new edition • Better tests, if not a testable (executable) specification • Adopt de facto standards where possible • Keep versioning as simple and linear as possible mozilla 3Wednesday, May 4, 2011
    • The Harmony goals • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications • code generators targeting the new edition • Better tests, if not a testable (executable) specification • Adopt de facto standards where possible • Keep versioning as simple and linear as possible • Support a statically verifiable, object-capability secure subset mozilla 3Wednesday, May 4, 2011
    • Approved for ES.next mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() • parameter default values: function f(x, y=1, z=0) {...} mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() • parameter default values: function f(x, y=1, z=0) {...} • rest, spread: function g(i, j, ...r) { return r.slice(i, j); } let a = [0,1,2,3], o = new any_constructor(...a) mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() • parameter default values: function f(x, y=1, z=0) {...} • rest, spread: function g(i, j, ...r) { return r.slice(i, j); } let a = [0,1,2,3], o = new any_constructor(...a) • proxies, weak maps: Proxy.create(handler, proto), new WeakMap mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() • parameter default values: function f(x, y=1, z=0) {...} • rest, spread: function g(i, j, ...r) { return r.slice(i, j); } let a = [0,1,2,3], o = new any_constructor(...a) • proxies, weak maps: Proxy.create(handler, proto), new WeakMap • modules: module M { export function fast_sin(x) {...} } mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() • parameter default values: function f(x, y=1, z=0) {...} • rest, spread: function g(i, j, ...r) { return r.slice(i, j); } let a = [0,1,2,3], o = new any_constructor(...a) • proxies, weak maps: Proxy.create(handler, proto), new WeakMap • modules: module M { export function fast_sin(x) {...} } • iterators, generators: function* gen() { yield 1; yield 2; } mozilla 4Wednesday, May 4, 2011
    • Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() • parameter default values: function f(x, y=1, z=0) {...} • rest, spread: function g(i, j, ...r) { return r.slice(i, j); } let a = [0,1,2,3], o = new any_constructor(...a) • proxies, weak maps: Proxy.create(handler, proto), new WeakMap • modules: module M { export function fast_sin(x) {...} } • iterators, generators: function* gen() { yield 1; yield 2; } mozilla • comprehensions: return [a+b for (a in A) for (b in B)] 4Wednesday, May 4, 2011
    • Yet more approved for ES.next mozilla 5Wednesday, May 4, 2011
    • Yet more approved for ES.next • Binary data: mozilla 5Wednesday, May 4, 2011
    • Yet more approved for ES.next • Binary data: • const Point2D = new StructType({ x: uint32, y: uint32 }), Color = new StructType({ r: uint8, g: uint8, b: uint8 }), Pixel = new StructType({ point: Point2D, color: Color }); mozilla 5Wednesday, May 4, 2011
    • Yet more approved for ES.next • Binary data: • const Point2D = new StructType({ x: uint32, y: uint32 }), Color = new StructType({ r: uint8, g: uint8, b: uint8 }), Pixel = new StructType({ point: Point2D, color: Color }); • const Triangle = new ArrayType(Pixel, 3); mozilla 5Wednesday, May 4, 2011
    • Yet more approved for ES.next • Binary data: • const Point2D = new StructType({ x: uint32, y: uint32 }), Color = new StructType({ r: uint8, g: uint8, b: uint8 }), Pixel = new StructType({ point: Point2D, color: Color }); • const Triangle = new ArrayType(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 } }]); mozilla 5Wednesday, May 4, 2011
    • Hot, but not yet in Harmony mozilla 6Wednesday, May 4, 2011
    • Hot, but not yet in Harmony • Arrow function syntax, instead of λ, ƒ, or # (want to save # for later) mozilla 6Wednesday, May 4, 2011
    • Hot, but not yet in Harmony • Arrow function syntax, instead of λ, ƒ, or # (want to save # for later) • Just like CoffeeScript: let identity = (x) -> x mozilla 6Wednesday, May 4, 2011
    • Hot, but not yet in Harmony • Arrow function syntax, instead of λ, ƒ, or # (want to save # for later) • Just like CoffeeScript: let identity = (x) -> x • Expression body: const square = (x) -> (x * x) mozilla 6Wednesday, May 4, 2011
    • Hot, but not yet in Harmony • Arrow function syntax, instead of λ, ƒ, or # (want to save # for later) • Just like CoffeeScript: let identity = (x) -> x • Expression body: const square = (x) -> (x * x) • Statement body: let countUsed = (str) -> { if (str in usedWords) usedWords[str]++; else usedWords[str] = 1; } mozilla 6Wednesday, May 4, 2011
    • Hot, but not yet in Harmony • Arrow function syntax, instead of λ, ƒ, or # (want to save # for later) • Just like CoffeeScript: let identity = (x) -> x • Expression body: const square = (x) -> (x * x) • Statement body: let countUsed = (str) -> { if (str in usedWords) usedWords[str]++; else usedWords[str] = 1; } • Fat arrow too: callback = (msg) => ( this.vmail.push(msg) ) mozilla 6Wednesday, May 4, 2011
    • Hot, but not yet in Harmony • Arrow function syntax, instead of λ, ƒ, or # (want to save # for later) • Just like CoffeeScript: let identity = (x) -> x • Expression body: const square = (x) -> (x * x) • Statement body: let countUsed = (str) -> { if (str in usedWords) usedWords[str]++; else usedWords[str] = 1; } • Fat arrow too: callback = (msg) => ( this.vmail.push(msg) ) • Binding forms: let f() -> “writable” const K() -> “readonly” mozilla 6Wednesday, May 4, 2011
    • What else? mozilla 7Wednesday, May 4, 2011
    • What else? • CoffeeScript classes, for prototypal inheritance sugar • Or a different classes as closure pattern sugar proposal? • Or (and this is somewhat Coffee-like) extended object initialisers? mozilla 7Wednesday, May 4, 2011
    • What else? • CoffeeScript classes, for prototypal inheritance sugar • Or a different classes as closure pattern sugar proposal? • Or (and this is somewhat Coffee-like) extended object initialisers? • Coffee’s @foo for this.foo • Or some private names or “soft fields” @ usage? mozilla 7Wednesday, May 4, 2011
    • What else? • CoffeeScript classes, for prototypal inheritance sugar • Or a different classes as closure pattern sugar proposal? • Or (and this is somewhat Coffee-like) extended object initialisers? • Coffee’s @foo for this.foo • Or some private names or “soft fields” @ usage? • Paren-free syntax: if x > y return x while i < n { a.push(i++); } mozilla 7Wednesday, May 4, 2011
    • What else? • CoffeeScript classes, for prototypal inheritance sugar • Or a different classes as closure pattern sugar proposal? • Or (and this is somewhat Coffee-like) extended object initialisers? • Coffee’s @foo for this.foo • Or some private names or “soft fields” @ usage? • Paren-free syntax: if x > y return x while i < n { a.push(i++); } • More operators: ?? ??= div mod divmod is isnt mozilla 7Wednesday, May 4, 2011
    • What’s going on here? • Remember these Harmony goals: • Be a better language for writing: • complex applications • libraries (including the DOM) shared by those applications • code generators targeting the new edition • Adopt de facto standards where possible mozilla 8Wednesday, May 4, 2011
    • Word of the day: Transpiler mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. en.wikipedia.org/wiki/Transpiler mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. en.wikipedia.org/wiki/Transpiler mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. en.wikipedia.org/wiki/Transpiler • CoffeeScript, many others mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. en.wikipedia.org/wiki/Transpiler • CoffeeScript, many others • Dave Herman’s module loaders for language polyfills mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. en.wikipedia.org/wiki/Transpiler • CoffeeScript, many others • Dave Herman’s module loaders for language polyfills • Debuggable primary source support coming in Firefox mozilla 9Wednesday, May 4, 2011
    • Word of the day: Transpiler A transcompiler (also known as transpiler) is a special compiler that translates the source code of a programming language into the source code of another programming language, e.g. from Pascal to C. en.wikipedia.org/wiki/Transpiler • CoffeeScript, many others • Dave Herman’s module loaders for language polyfills • Debuggable primary source support coming in Firefox mozilla 9Wednesday, May 4, 2011
    • Back to Jeremy... mozilla 10Wednesday, May 4, 2011