Ecma TC39:The Good,                    The Bad, and the UglySaturday, June 11, 2011
Ecma TC39:The Good,                    The Bad, and the Ugly                     •    A Sweaty Standards SagaSaturday, Jun...
Ecma TC39:The Good,                    The Bad, and the Ugly                     •    A Sweaty Standards Saga             ...
Ecma TC39:The Good,                    The Bad, and the Ugly                     •    A Sweaty Standards Saga             ...
Standards CommitteesSaturday, June 11, 2011
HistorySaturday, June 11, 2011
History                     •    ECMA founded May 1961Saturday, June 11, 2011
History                     •    ECMA founded May 1961                     •    ECMA-234 standardized                     ...
History                     •    ECMA founded May 1961                     •    ECMA-234 standardized                     ...
History                     •    ECMA founded May 1961                     •    ECMA-234 standardized                     ...
The GoodSaturday, June 11, 2011
Good PartsSaturday, June 11, 2011
Good Parts                     •    Expert shooters (@awbjs, crock, erights, @littlecalculist,                          @s...
Good Parts                     •    Expert shooters (@awbjs, crock, erights, @littlecalculist,                          @s...
Good Parts                     •    Expert shooters (@awbjs, crock, erights, @littlecalculist,                          @s...
Good Parts                     •    Expert shooters (@awbjs, crock, erights, @littlecalculist,                          @s...
The School of AthensSaturday, June 11, 2011
Saturday, June 11, 2011
Hermeneutic CyclesSaturday, June 11, 2011
Hermeneutic Cycles                     •    Language design requires                          interpretation: of tradition...
Hermeneutic Cycles                     •    Language design requires                          interpretation: of tradition...
Hermeneutic Cycles                     •    Language design requires                          interpretation: of tradition...
The BadSaturday, June 11, 2011
Bad PartsSaturday, June 11, 2011
Bad Parts                     •    Zero-sum gaming (“cannot have X and independent Y”)Saturday, June 11, 2011
Bad Parts                     •    Zero-sum gaming (“cannot have X and independent Y”)                     •    Horse-trad...
Bad Parts                     •    Zero-sum gaming (“cannot have X and independent Y”)                     •    Horse-trad...
Bad Parts                     •    Zero-sum gaming (“cannot have X and independent Y”)                     •    Horse-trad...
The UglySaturday, June 11, 2011
Competitive DriveSaturday, June 11, 2011
Competitive Drive                     •    Meta-discussions that can hide business agendas:Saturday, June 11, 2011
Competitive Drive                     •    Meta-discussions that can hide business agendas:                          •   M...
Competitive Drive                     •    Meta-discussions that can hide business agendas:                          •   M...
Competitive Drive                     •    Meta-discussions that can hide business agendas:                          •   M...
Competitive Drive                     •    Meta-discussions that can hide business agendas:                          •   M...
Competitive Drive                     •    Meta-discussions that can hide business agendas:                          •   M...
Competitive Drive                     •    Meta-discussions that can hide business agendas:                          •   M...
Approved for ES.next                                 mozilla          13Saturday, June 11, 2011
Approved for ES.next          • let, const, function in block scope                                                  mozil...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Approved for ES.next          • let, const, function in block scope          • destructuring: let {x, y} = pt; let [s, v, ...
Yet more approved for ES.next                                          mozilla          14Saturday, June 11, 2011
Yet more approved for ES.next          • Binary data:                                          mozilla          14Saturday...
Yet more approved for ES.next          • Binary data:                • const Point2D = new StructType({ x: uint32, y: uint...
Yet more approved for ES.next          • Binary data:                • const Point2D = new StructType({ x: uint32, y: uint...
Yet more approved for ES.next          • Binary data:                • const Point2D = new StructType({ x: uint32, y: uint...
Classes made it (Yay, I think? Why am I sad?)                                                          mozilla          15...
Classes made it (Yay, I think? Why am I sad?)          • Sugar for prototypal object pattern, also supports closure patter...
Classes made it (Yay, I think? Why am I sad?)          • Sugar for prototypal object pattern, also supports closure patter...
Classes made it (Yay, I think? Why am I sad?)          • Sugar for prototypal object pattern, also supports closure patter...
Classes made it (Yay, I think? Why am I sad?)          • Sugar for prototypal object pattern, also supports closure patter...
Private Name objects                                 mozilla          16Saturday, June 11, 2011
Private Name objects          • A built-in module providing unique property naming:                                       ...
Private Name objects          • A built-in module providing unique property naming:                • module Name = require...
Private Name objects          • A built-in module providing unique property naming:                • module Name = require...
Quasis          • Injection-safer string interpolation and domain-specific languages          • Backtick-quoted string desu...
HarmonySaturday, June 11, 2011
Harmony                     •    Yes, we are a commiteeSaturday, June 11, 2011
Harmony                     •    Yes, we are a commitee                     •    We try to avoid design by committee bySat...
Harmony                     •    Yes, we are a commitee                     •    We try to avoid design by committee by   ...
Harmony                     •    Yes, we are a commitee                     •    We try to avoid design by committee by   ...
Harmony                     •    Yes, we are a commitee                     •    We try to avoid design by committee by   ...
Harmony                     •    Yes, we are a commitee                     •    We try to avoid design by committee by   ...
Languages are like                          friends (and enemies)Saturday, June 11, 2011
Languages are like                          friends (and enemies)                     •    Package deal: bad parts along w...
Languages are like                          friends (and enemies)                     •    Package deal: bad parts along w...
Languages are like                          friends (and enemies)                     •    Package deal: bad parts along w...
Languages are like                          friends (and enemies)                     •    Package deal: bad parts along w...
Languages are like                          friends (and enemies)                     •    Package deal: bad parts along w...
Stand-off / Q&ASaturday, June 11, 2011
Upcoming SlideShare
Loading in...5
×

Txjs talk

5,704

Published on

My #txjs talk, with apologies to Sergio Leone, Clint, Eli, and Lee.

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,704
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
40
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Txjs talk

  1. 1. Ecma TC39:The Good, The Bad, and the UglySaturday, June 11, 2011
  2. 2. Ecma TC39:The Good, The Bad, and the Ugly • A Sweaty Standards SagaSaturday, June 11, 2011
  3. 3. Ecma TC39:The Good, The Bad, and the Ugly • A Sweaty Standards Saga • Third part of a trilogy...Saturday, June 11, 2011
  4. 4. Ecma TC39:The Good, The Bad, and the Ugly • A Sweaty Standards Saga • Third part of a trilogy... • Brendan Eich brendan@mozilla.orgSaturday, June 11, 2011
  5. 5. Standards CommitteesSaturday, June 11, 2011
  6. 6. HistorySaturday, June 11, 2011
  7. 7. History • ECMA founded May 1961Saturday, June 11, 2011
  8. 8. History • ECMA founded May 1961 • ECMA-234 standardized Windows API, driven by European governmentsSaturday, June 11, 2011
  9. 9. History • ECMA founded May 1961 • ECMA-234 standardized Windows API, driven by European governments • Netscape took JS to ECMA in November 1996 (pictured: Jan van den Beld, S-G ECMA at the time)Saturday, June 11, 2011
  10. 10. History • ECMA founded May 1961 • ECMA-234 standardized Windows API, driven by European governments • Netscape took JS to ECMA in November 1996 (pictured: Jan van den Beld, S-G ECMA at the time) • Sun failed to repeat w/ JavaSaturday, June 11, 2011
  11. 11. The GoodSaturday, June 11, 2011
  12. 12. Good PartsSaturday, June 11, 2011
  13. 13. Good Parts • Expert shooters (@awbjs, crock, erights, @littlecalculist, @samth, @slightlylate, Waldemar Horwat, many more)Saturday, June 11, 2011
  14. 14. Good Parts • Expert shooters (@awbjs, crock, erights, @littlecalculist, @samth, @slightlylate, Waldemar Horwat, many more) • Care & love for JS as a good in itself, free of biz. agendasSaturday, June 11, 2011
  15. 15. Good Parts • Expert shooters (@awbjs, crock, erights, @littlecalculist, @samth, @slightlylate, Waldemar Horwat, many more) • Care & love for JS as a good in itself, free of biz. agendas • Consensus-driven -> “intersubjectivity” (Husserl)Saturday, June 11, 2011
  16. 16. Good Parts • Expert shooters (@awbjs, crock, erights, @littlecalculist, @samth, @slightlylate, Waldemar Horwat, many more) • Care & love for JS as a good in itself, free of biz. agendas • Consensus-driven -> “intersubjectivity” (Husserl) • "Logic presumes a separation of subject from object; therefore logic is not final wisdom.This is Zen. This is my motorcycle maintenance. " — Robert M. Pirsig (Zen and the Art of Motorcycle Maintenance: An Inquiry Into Values)Saturday, June 11, 2011
  17. 17. The School of AthensSaturday, June 11, 2011
  18. 18. Saturday, June 11, 2011
  19. 19. Hermeneutic CyclesSaturday, June 11, 2011
  20. 20. Hermeneutic Cycles • Language design requires interpretation: of tradition, culture, technical specs, also of one another as subjects among the TC39 membersSaturday, June 11, 2011
  21. 21. Hermeneutic Cycles • Language design requires interpretation: of tradition, culture, technical specs, also of one another as subjects among the TC39 members • Interpretation must circle (Heidegger) or spiral (Gadamer, Schön)Saturday, June 11, 2011
  22. 22. Hermeneutic Cycles • Language design requires interpretation: of tradition, culture, technical specs, also of one another as subjects among the TC39 members • Interpretation must circle (Heidegger) or spiral (Gadamer, Schön) • Global optimization, balanceSaturday, June 11, 2011
  23. 23. The BadSaturday, June 11, 2011
  24. 24. Bad PartsSaturday, June 11, 2011
  25. 25. Bad Parts • Zero-sum gaming (“cannot have X and independent Y”)Saturday, June 11, 2011
  26. 26. Bad Parts • Zero-sum gaming (“cannot have X and independent Y”) • Horse-trading like congress-critters (“I give you X, you give me Y”)Saturday, June 11, 2011
  27. 27. Bad Parts • Zero-sum gaming (“cannot have X and independent Y”) • Horse-trading like congress-critters (“I give you X, you give me Y”) • Premature/piece-wise complexity-budget bean-counting. Risks getting stuck hill-climbing at local maxima (see the Hermeneutic spiral)Saturday, June 11, 2011
  28. 28. Bad Parts • Zero-sum gaming (“cannot have X and independent Y”) • Horse-trading like congress-critters (“I give you X, you give me Y”) • Premature/piece-wise complexity-budget bean-counting. Risks getting stuck hill-climbing at local maxima (see the Hermeneutic spiral) • “Scenario-solving” without decomposition into sound and orthogonal primitives that work with the rest of the language (E4X is one example)Saturday, June 11, 2011
  29. 29. The UglySaturday, June 11, 2011
  30. 30. Competitive DriveSaturday, June 11, 2011
  31. 31. Competitive Drive • Meta-discussions that can hide business agendas:Saturday, June 11, 2011
  32. 32. Competitive Drive • Meta-discussions that can hide business agendas: • M-d #14: “This language doesn’t really need X”Saturday, June 11, 2011
  33. 33. Competitive Drive • Meta-discussions that can hide business agendas: • M-d #14: “This language doesn’t really need X” • M-d #39: “This will forever change the way JS is used”Saturday, June 11, 2011
  34. 34. Competitive Drive • Meta-discussions that can hide business agendas: • M-d #14: “This language doesn’t really need X” • M-d #39: “This will forever change the way JS is used” • M-d #27: “Won’t this confuse n00bs?”Saturday, June 11, 2011
  35. 35. Competitive Drive • Meta-discussions that can hide business agendas: • M-d #14: “This language doesn’t really need X” • M-d #39: “This will forever change the way JS is used” • M-d #27: “Won’t this confuse n00bs?” • All valid:YAGNI, don’t-make-it-Java, keep-it-approachableSaturday, June 11, 2011
  36. 36. Competitive Drive • Meta-discussions that can hide business agendas: • M-d #14: “This language doesn’t really need X” • M-d #39: “This will forever change the way JS is used” • M-d #27: “Won’t this confuse n00bs?” • All valid:YAGNI, don’t-make-it-Java, keep-it-approachable • All meta-endless, without specific arguments, evidenceSaturday, June 11, 2011
  37. 37. Competitive Drive • Meta-discussions that can hide business agendas: • M-d #14: “This language doesn’t really need X” • M-d #39: “This will forever change the way JS is used” • M-d #27: “Won’t this confuse n00bs?” • All valid:YAGNI, don’t-make-it-Java, keep-it-approachable • All meta-endless, without specific arguments, evidence • Better: address concrete use-cases, fill language gapsSaturday, June 11, 2011
  38. 38. Approved for ES.next mozilla 13Saturday, June 11, 2011
  39. 39. Approved for ES.next • let, const, function in block scope mozilla 13Saturday, June 11, 2011
  40. 40. Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() mozilla 13Saturday, June 11, 2011
  41. 41. 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 13Saturday, June 11, 2011
  42. 42. 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 13Saturday, June 11, 2011
  43. 43. 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 13Saturday, June 11, 2011
  44. 44. 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 NewMath { export function fast_sin(x) {...} } mozilla 13Saturday, June 11, 2011
  45. 45. 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 NewMath { export function fast_sin(x) {...} } • iterators, generators: function* gen() { yield 1; yield 2; } mozilla 13Saturday, June 11, 2011
  46. 46. 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 NewMath { 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)] 13Saturday, June 11, 2011
  47. 47. Yet more approved for ES.next mozilla 14Saturday, June 11, 2011
  48. 48. Yet more approved for ES.next • Binary data: mozilla 14Saturday, June 11, 2011
  49. 49. 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 14Saturday, June 11, 2011
  50. 50. 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 14Saturday, June 11, 2011
  51. 51. 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 14Saturday, June 11, 2011
  52. 52. Classes made it (Yay, I think? Why am I sad?) mozilla 15Saturday, June 11, 2011
  53. 53. Classes made it (Yay, I think? Why am I sad?) • Sugar for prototypal object pattern, also supports closure patterns: mozilla 15Saturday, June 11, 2011
  54. 54. Classes made it (Yay, I think? Why am I sad?) • Sugar for prototypal object pattern, also supports closure patterns: • class Point { constructor(x, y) { private x = x; private y = y; public closed_r() { return Math.sqrt(x*x + y*y); } } get x() { return @x; } get y() { return @y; } equals(p) { return @x === p@x && @y === p@y; } proto_r() { return Math.sqrt(@x * @x + @y * @y); } } mozilla 15Saturday, June 11, 2011
  55. 55. Classes made it (Yay, I think? Why am I sad?) • Sugar for prototypal object pattern, also supports closure patterns: • class Point { constructor(x, y) { private x = x; private y = y; public closed_r() { return Math.sqrt(x*x + y*y); } } get x() { return @x; } get y() { return @y; } equals(p) { return @x === p@x && @y === p@y; } proto_r() { return Math.sqrt(@x * @x + @y * @y); } } • Private member reference syntax (@x, p@x) still up in the air... mozilla 15Saturday, June 11, 2011
  56. 56. Classes made it (Yay, I think? Why am I sad?) • Sugar for prototypal object pattern, also supports closure patterns: • class Point { constructor(x, y) { private x = x; private y = y; public closed_r() { return Math.sqrt(x*x + y*y); } } get x() { return @x; } get y() { return @y; } equals(p) { return @x === p@x && @y === p@y; } proto_r() { return Math.sqrt(@x * @x + @y * @y); } } • Private member reference syntax (@x, p@x) still up in the air... • extends, prototype, and super work the way you want mozilla 15Saturday, June 11, 2011
  57. 57. Private Name objects mozilla 16Saturday, June 11, 2011
  58. 58. Private Name objects • A built-in module providing unique property naming: mozilla 16Saturday, June 11, 2011
  59. 59. Private Name objects • A built-in module providing unique property naming: • module Name = require "@name"; const key = Name.create("secret"); function MyClass(privateData) { this[key] = privateData; } MyClass.prototype = { doStuff() { ... this[key] ... } }; mozilla 16Saturday, June 11, 2011
  60. 60. Private Name objects • A built-in module providing unique property naming: • module Name = require "@name"; const key = Name.create("secret"); function MyClass(privateData) { this[key] = privateData; } MyClass.prototype = { doStuff() { ... this[key] ... } }; • No loss of privacy via Proxies: key becomes key.public when passed as id to a trap; only the keymaster can tell by testing key.public === id mozilla 16Saturday, June 11, 2011
  61. 61. Quasis • Injection-safer string interpolation and domain-specific languages • Backtick-quoted string desugars to a function call that operates on the literal portions and substitution results: • quasi`literalPart1${substitution}literalPart2` desugars to • quasi({raw: ["literalPart1", "literalPart1"], unescaped: ["literalPart1", "literalPart1"]}, substitution) • Multiline string literals w/o prefix: `literalPart1${substitution} (yes, that was a newline!) literalPart2` mozilla • Multiline regexp literals: re`literalPart1${substitution} (yes, that was a newline!) w+ literalPart2` 17Saturday, June 11, 2011
  62. 62. HarmonySaturday, June 11, 2011
  63. 63. Harmony • Yes, we are a commiteeSaturday, June 11, 2011
  64. 64. Harmony • Yes, we are a commitee • We try to avoid design by committee bySaturday, June 11, 2011
  65. 65. Harmony • Yes, we are a commitee • We try to avoid design by committee by • De-facto standards codificationSaturday, June 11, 2011
  66. 66. Harmony • Yes, we are a commitee • We try to avoid design by committee by • De-facto standards codification • The “Champions” modelSaturday, June 11, 2011
  67. 67. Harmony • Yes, we are a commitee • We try to avoid design by committee by • De-facto standards codification • The “Champions” model • Developers matter to browser vendors more than everSaturday, June 11, 2011
  68. 68. Harmony • Yes, we are a commitee • We try to avoid design by committee by • De-facto standards codification • The “Champions” model • Developers matter to browser vendors more than ever • Make your voices heard with cogent arguments (avoid rehashing, no trolling: es-discuss@mozilla.org)Saturday, June 11, 2011
  69. 69. Languages are like friends (and enemies)Saturday, June 11, 2011
  70. 70. Languages are like friends (and enemies) • Package deal: bad parts along with goodSaturday, June 11, 2011
  71. 71. Languages are like friends (and enemies) • Package deal: bad parts along with good • You can subsetSaturday, June 11, 2011
  72. 72. Languages are like friends (and enemies) • Package deal: bad parts along with good • You can subset • You do sometimes debug your friendsSaturday, June 11, 2011
  73. 73. Languages are like friends (and enemies) • Package deal: bad parts along with good • You can subset • You do sometimes debug your friends • You can unfriend, betray, change alliancesSaturday, June 11, 2011
  74. 74. Languages are like friends (and enemies) • Package deal: bad parts along with good • You can subset • You do sometimes debug your friends • You can unfriend, betray, change alliances • JS wants to remain your BFF!Saturday, June 11, 2011
  75. 75. Stand-off / Q&ASaturday, June 11, 2011
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×