SlideShare uma empresa Scribd logo
1 de 75
Baixar para ler offline
Ecma TC39:The Good,
                    The Bad, and the Ugly




Saturday, June 11, 2011
Ecma TC39:The Good,
                    The Bad, and the Ugly
                     •    A Sweaty Standards Saga




Saturday, June 11, 2011
Ecma TC39:The Good,
                    The Bad, and the Ugly
                     •    A Sweaty Standards Saga

                     •    Third part of a trilogy...




Saturday, June 11, 2011
Ecma TC39:The Good,
                    The Bad, and the Ugly
                     •    A Sweaty Standards Saga

                     •    Third part of a trilogy...

                     •    Brendan Eich

                          brendan@mozilla.org




Saturday, June 11, 2011
Standards Committees




Saturday, June 11, 2011
History




Saturday, June 11, 2011
History
                     •    ECMA founded May 1961




Saturday, June 11, 2011
History
                     •    ECMA founded May 1961

                     •    ECMA-234 standardized
                          Windows API, driven by
                          European governments




Saturday, June 11, 2011
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
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/ Java

Saturday, June 11, 2011
The Good




Saturday, June 11, 2011
Good Parts




Saturday, June 11, 2011
Good Parts
                     •    Expert shooters (@awbjs, crock, erights, @littlecalculist,
                          @samth, @slightlylate, Waldemar Horwat, many more)




Saturday, June 11, 2011
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




Saturday, June 11, 2011
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
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
The School of Athens




Saturday, June 11, 2011
Saturday, June 11, 2011
Hermeneutic Cycles




Saturday, June 11, 2011
Hermeneutic Cycles
                     •    Language design requires
                          interpretation: of tradition,
                          culture, technical specs, also of
                          one another as subjects among
                          the TC39 members




Saturday, June 11, 2011
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
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, balance



Saturday, June 11, 2011
The Bad




Saturday, June 11, 2011
Bad Parts




Saturday, 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-trading like congress-critters (“I give you X, you
                          give me Y”)




Saturday, June 11, 2011
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
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
The Ugly




Saturday, June 11, 2011
Competitive Drive




Saturday, 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-d #14: “This language doesn’t really need X”




Saturday, June 11, 2011
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
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
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




Saturday, June 11, 2011
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




Saturday, June 11, 2011
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 gaps



Saturday, June 11, 2011
Approved for ES.next




                                 mozilla

          13


Saturday, June 11, 2011
Approved for ES.next

          • let, const, function in block scope




                                                  mozilla

          13


Saturday, June 11, 2011
Approved for ES.next

          • let, const, function in block scope

          • destructuring: let {x, y} = pt; let [s, v, o] = triple()




                                                                       mozilla

          13


Saturday, June 11, 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

          13


Saturday, June 11, 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

          13


Saturday, June 11, 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

          13


Saturday, June 11, 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 NewMath { export function fast_sin(x) {...} }


                                                                       mozilla

          13


Saturday, June 11, 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 NewMath { export function fast_sin(x) {...} }

          • iterators, generators: function* gen() { yield 1; yield 2; }
                                                                           mozilla

          13


Saturday, June 11, 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 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)]

          13


Saturday, June 11, 2011
Yet more approved for ES.next




                                          mozilla

          14


Saturday, June 11, 2011
Yet more approved for ES.next

          • Binary data:




                                          mozilla

          14


Saturday, June 11, 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

          14


Saturday, June 11, 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

          14


Saturday, June 11, 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

          14


Saturday, June 11, 2011
Classes made it (Yay, I think? Why am I sad?)




                                                          mozilla

          15


Saturday, June 11, 2011
Classes made it (Yay, I think? Why am I sad?)

          • Sugar for prototypal object pattern, also supports closure patterns:




                                                                                   mozilla

          15


Saturday, June 11, 2011
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

          15


Saturday, June 11, 2011
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

          15


Saturday, June 11, 2011
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

          15


Saturday, June 11, 2011
Private Name objects




                                 mozilla

          16


Saturday, June 11, 2011
Private Name objects

          • A built-in module providing unique property naming:




                                                                  mozilla

          16


Saturday, June 11, 2011
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

          16


Saturday, June 11, 2011
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

          16


Saturday, June 11, 2011
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`
          17


Saturday, June 11, 2011
Harmony




Saturday, June 11, 2011
Harmony
                     •    Yes, we are a commitee




Saturday, June 11, 2011
Harmony
                     •    Yes, we are a commitee

                     •    We try to avoid design by committee by




Saturday, June 11, 2011
Harmony
                     •    Yes, we are a commitee

                     •    We try to avoid design by committee by

                          •   De-facto standards codification




Saturday, June 11, 2011
Harmony
                     •    Yes, we are a commitee

                     •    We try to avoid design by committee by

                          •   De-facto standards codification

                          •   The “Champions” model




Saturday, June 11, 2011
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




Saturday, June 11, 2011
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
Languages are like
                          friends (and enemies)




Saturday, June 11, 2011
Languages are like
                          friends (and enemies)
                     •    Package deal: bad parts along with good




Saturday, June 11, 2011
Languages are like
                          friends (and enemies)
                     •    Package deal: bad parts along with good

                     •    You can subset




Saturday, June 11, 2011
Languages are like
                          friends (and enemies)
                     •    Package deal: bad parts along with good

                     •    You can subset

                     •    You do sometimes debug your friends




Saturday, June 11, 2011
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




Saturday, June 11, 2011
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
Stand-off / Q&A




Saturday, June 11, 2011

Mais conteúdo relacionado

Destaque

JS Responsibilities
JS ResponsibilitiesJS Responsibilities
JS ResponsibilitiesBrendan Eich
 
Mozilla's NodeConf talk
Mozilla's NodeConf talkMozilla's NodeConf talk
Mozilla's NodeConf talkBrendan Eich
 
Mozilla Research Party Talk
Mozilla Research Party TalkMozilla Research Party Talk
Mozilla Research Party TalkBrendan Eich
 
Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016Brendan Eich
 
Extensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScriptExtensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScriptBrendan Eich
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Brendan Eich
 
Value objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressValue objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressBrendan Eich
 
The Same-Origin Saga
The Same-Origin SagaThe Same-Origin Saga
The Same-Origin SagaBrendan Eich
 
شيت دمحمددسوقى
شيت دمحمددسوقىشيت دمحمددسوقى
شيت دمحمددسوقىabdoo2020
 
автосалон комплекс
автосалон комплексавтосалон комплекс
автосалон комплексEugen Tolochin
 
Professional Resume - Allison
Professional Resume - AllisonProfessional Resume - Allison
Professional Resume - AllisonKatie Allison
 

Destaque (20)

My dotJS Talk
My dotJS TalkMy dotJS Talk
My dotJS Talk
 
Web futures
Web futuresWeb futures
Web futures
 
JS Responsibilities
JS ResponsibilitiesJS Responsibilities
JS Responsibilities
 
Fluent15
Fluent15Fluent15
Fluent15
 
Fluent14
Fluent14Fluent14
Fluent14
 
Paren free
Paren freeParen free
Paren free
 
Mozilla's NodeConf talk
Mozilla's NodeConf talkMozilla's NodeConf talk
Mozilla's NodeConf talk
 
Taysom seminar
Taysom seminarTaysom seminar
Taysom seminar
 
Mozilla Research Party Talk
Mozilla Research Party TalkMozilla Research Party Talk
Mozilla Research Party Talk
 
dotJS 2015
dotJS 2015dotJS 2015
dotJS 2015
 
Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016
 
Extensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScriptExtensible Operators and Literals for JavaScript
Extensible Operators and Literals for JavaScript
 
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Value Objects, Full Throttle (to be updated for spring TC39 meetings)
Value Objects, Full Throttle (to be updated for spring TC39 meetings)
 
Value objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progressValue objects in JS - an ES7 work in progress
Value objects in JS - an ES7 work in progress
 
The Same-Origin Saga
The Same-Origin SagaThe Same-Origin Saga
The Same-Origin Saga
 
Redenção
RedençãoRedenção
Redenção
 
resume
resumeresume
resume
 
شيت دمحمددسوقى
شيت دمحمددسوقىشيت دمحمددسوقى
شيت دمحمددسوقى
 
автосалон комплекс
автосалон комплексавтосалон комплекс
автосалон комплекс
 
Professional Resume - Allison
Professional Resume - AllisonProfessional Resume - Allison
Professional Resume - Allison
 

Último

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Txjs talk

  • 1. Ecma TC39:The Good, The Bad, and the Ugly Saturday, June 11, 2011
  • 2. Ecma TC39:The Good, The Bad, and the Ugly • A Sweaty Standards Saga Saturday, June 11, 2011
  • 3. Ecma TC39:The Good, The Bad, and the Ugly • A Sweaty Standards Saga • Third part of a trilogy... Saturday, June 11, 2011
  • 4. Ecma TC39:The Good, The Bad, and the Ugly • A Sweaty Standards Saga • Third part of a trilogy... • Brendan Eich brendan@mozilla.org Saturday, June 11, 2011
  • 7. History • ECMA founded May 1961 Saturday, June 11, 2011
  • 8. History • ECMA founded May 1961 • ECMA-234 standardized Windows API, driven by European governments Saturday, June 11, 2011
  • 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. 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/ Java Saturday, June 11, 2011
  • 13. Good Parts • Expert shooters (@awbjs, crock, erights, @littlecalculist, @samth, @slightlylate, Waldemar Horwat, many more) Saturday, June 11, 2011
  • 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. agendas Saturday, June 11, 2011
  • 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. 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. The School of Athens Saturday, June 11, 2011
  • 20. Hermeneutic Cycles • Language design requires interpretation: of tradition, culture, technical specs, also of one another as subjects among the TC39 members Saturday, June 11, 2011
  • 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. 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, balance Saturday, June 11, 2011
  • 25. Bad Parts • Zero-sum gaming (“cannot have X and independent Y”) Saturday, June 11, 2011
  • 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. 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. 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
  • 31. Competitive Drive • Meta-discussions that can hide business agendas: Saturday, June 11, 2011
  • 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. 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. 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. 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 Saturday, June 11, 2011
  • 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, evidence Saturday, June 11, 2011
  • 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 gaps Saturday, June 11, 2011
  • 38. Approved for ES.next mozilla 13 Saturday, June 11, 2011
  • 39. Approved for ES.next • let, const, function in block scope mozilla 13 Saturday, June 11, 2011
  • 40. Approved for ES.next • let, const, function in block scope • destructuring: let {x, y} = pt; let [s, v, o] = triple() mozilla 13 Saturday, June 11, 2011
  • 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 13 Saturday, June 11, 2011
  • 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 13 Saturday, June 11, 2011
  • 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 13 Saturday, June 11, 2011
  • 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 13 Saturday, June 11, 2011
  • 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 13 Saturday, June 11, 2011
  • 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)] 13 Saturday, June 11, 2011
  • 47. Yet more approved for ES.next mozilla 14 Saturday, June 11, 2011
  • 48. Yet more approved for ES.next • Binary data: mozilla 14 Saturday, June 11, 2011
  • 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 14 Saturday, June 11, 2011
  • 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 14 Saturday, June 11, 2011
  • 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 14 Saturday, June 11, 2011
  • 52. Classes made it (Yay, I think? Why am I sad?) mozilla 15 Saturday, June 11, 2011
  • 53. Classes made it (Yay, I think? Why am I sad?) • Sugar for prototypal object pattern, also supports closure patterns: mozilla 15 Saturday, June 11, 2011
  • 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 15 Saturday, June 11, 2011
  • 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 15 Saturday, June 11, 2011
  • 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 15 Saturday, June 11, 2011
  • 57. Private Name objects mozilla 16 Saturday, June 11, 2011
  • 58. Private Name objects • A built-in module providing unique property naming: mozilla 16 Saturday, June 11, 2011
  • 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 16 Saturday, June 11, 2011
  • 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 16 Saturday, June 11, 2011
  • 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` 17 Saturday, June 11, 2011
  • 63. Harmony • Yes, we are a commitee Saturday, June 11, 2011
  • 64. Harmony • Yes, we are a commitee • We try to avoid design by committee by Saturday, June 11, 2011
  • 65. Harmony • Yes, we are a commitee • We try to avoid design by committee by • De-facto standards codification Saturday, June 11, 2011
  • 66. Harmony • Yes, we are a commitee • We try to avoid design by committee by • De-facto standards codification • The “Champions” model Saturday, June 11, 2011
  • 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 ever Saturday, June 11, 2011
  • 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. Languages are like friends (and enemies) Saturday, June 11, 2011
  • 70. Languages are like friends (and enemies) • Package deal: bad parts along with good Saturday, June 11, 2011
  • 71. Languages are like friends (and enemies) • Package deal: bad parts along with good • You can subset Saturday, June 11, 2011
  • 72. Languages are like friends (and enemies) • Package deal: bad parts along with good • You can subset • You do sometimes debug your friends Saturday, June 11, 2011
  • 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 alliances Saturday, June 11, 2011
  • 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. Stand-off / Q&A Saturday, June 11, 2011