About tc39/ecma262

7abf6b0f75a5facea016cc58485a4a45?s=47 HIRAKI Satoru
December 08, 2015

About tc39/ecma262

7abf6b0f75a5facea016cc58485a4a45?s=128

HIRAKI Satoru

December 08, 2015
Tweet

Transcript

  1. tc39/ecma262 ஌ͬͯ·͔͢? Meguro.es #1 in Drecom HIRAKI Satoru / Layzie

  2. Agenda

  3. 1. ࣗݾ঺հ 2. tc39/ecma262ͱ͍͏ϦϙδτϦ͸ͳΜͳͷ ͔ 3. tc39/ecma262Ͱ஫໨ͷ࢓༷

  4. ࣗݾ঺հ

  5. ฏ໦ ૱ ωοτͰ͸Layzie Ͱग़຅ͯ͠·͢

  6. https://github.com/Layzie

  7. http://layzie.hatenablog.com/

  8. ڞஶͰࣥච͠·ͨ͠

  9. Frontend WeeklyͷΩϡϨʔλʔʹͳΓ·ͨ͠ https://frontendweekly.tokyo/

  10. ࠷ۙौ୩ͷ྘ͷձ͔ࣾΒస৬͠·ͨ͠ σβΠφʔɾΤϯδχΞઈࢍืू! http://www.medley.jp/

  11. tc39/ecma262ͱ͍͏ ϦϙδτϦ͸Կ?

  12. ͬ͘͟Γͱͨ͠ܦҢ ࣗ෼͸ຊ֨తʹ৘ใ௥ͬͯͨΘ͚͡Όͳ͍ͷͰɺ ͋͘·Ͱ΋ͬ͘͟Γ

  13. ECMASCript2015 ͷ࢓༷͸ ݩʑES WikiͰެ։ ͞Ε͍ͯͨ

  14. ࠓ೥11݄ɺMozillaओ࠵ͷ ViewSource Conference಺ͷ Discussion: JavaScript Todayͱ͍͏ηογϣϯ಺ ͰΞοϓσʔτͷաఔΛ Φʔϓϯʹ͢Δͱ͍͏ൃ ද͕͞ΕΔ

  15. ͦ͜Ͱɺ͜ͷϦϙδτϦ ͕࢖ΘΕͯ࢓༷ࡦఆ͕͞ ΕΔΑ͏ʹͳΔ ϦϙδτϦࣗମ͸2014೥4݄ʹ͸ଘ ࡏ͍ͯͨ͠

  16. ࠓ·ͰΑΓ΋͞Βʹ ࢓༷ࡦఆ͕ΦʔϓϯʹͳΓ·ͨ͠

  17. ࠷৽ͷ࢓༷͸ͪ͜ΒͰ֬ೝ http://tc39.github.io/ecma262/

  18. ٞ࿦͸ओʹ͜ͷES discussͱ GitHub IssueͰߦΘΕͯΔ

  19. ࢓༷ͷεςʔλεͷઆ໌͸ͪ͜Β https://tc39.github.io/process-document/

  20. ࢓༷ͷεςʔλεͷࡶͳઆ໌ Stage0 δϟετΞΠσΟΞɻΈΜͳ޷͖ͳ࢓༷ೖΕΑ͏ͥ ͷஈ֊ɻ Stage4 ࢓༷͸׬੒ͯ͠Δ্ʹɺผʑͷ2ͭͷVMͰಈ͔ͤ Δஈ֊ɻ

  21. ಠஅͰ঺հ͢Δ ஫໨ͷ࢓༷

  22. Array.prototype.includes()

  23. Array.prototype.includes() ͋Γͦ͏Ͱແ͔ͬͨ͜ͷϝιουɺݱࡏStage4 ͳΜͰɺ΄΅ES2016ೖΓ͢Δ͸ͣ…

  24. Array.prototype.includes() Array.prototype.indexOf()͕͜ͷ৔߹࢖ΘΕ Δ͜ͱ͕ଟ͔͚ͬͨͲɺNaN͸൑ఆͯ͘͠Εͳ͍ ΑͶ͍ͬͯ͏ཧ༝ [1, 2, 3].includes(2) // true [1,

    2, 3].includes(4) // false [1, 2, NaN].includes(NaN) // true [NaN].indexOf(NaN) // -1
  25. SIMD

  26. SIMD WebGL΍CanvasɺCryptoͳͲΛߴ଎Խ͢Δฒ ྻԋࢉͷͨΊͷ৽͍͠σʔλܕ࢓༷ɻ ·ͩStage3Ͱ͕͢ɺGoogleɺMozillaɺMSɺ IntelͳΜ͔͕ؔΘͬͯΔͷͰϒϥ΢βʹೖΔͷૣ ͦ͏ɻ

  27. SIMD ৄ͘͠͸MDN΁ https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/SIMD

  28. Trailing commas in function parameter lists and calls

  29. Trailing commas in function parameter lists and calls JavaScriptॻ͘ͷʹෆศͩΖ!ͱࢥͬͨͷ͔෼͔ Γ·ͤΜ͕ɺ͔֬ʹ͜͏ॻ͚ΔͱศརͰ͸͋Δ

    ͔…ͱ͍͏࢓༷ɻStage3ɻ ཁ͸ԾҾ਺ͷ࠷ޙʹέπΧϯϚೖΕͯ΋ಈ͘Α͏ ʹ͠Α͏ͥ!ͱ͍͏΋ͷɻ
  30. Trailing commas in function parameter lists and calls function hoge(

    foo, bar, baz, ) {/*...*/} hoge( 'foo', 'bar', 'baz', ) {/*...*/}
  31. ECMAScript Function Bind Syntax

  32. ECMAScript Function Bind Syntax thisͷόΠϯυΊΜͲ͔ͤ͑͘Β::Ͱग़དྷΔΑ͏ ʹ͠Α͏͍ͥͬͯ͏࢓༷ɻStage0

  33. ECMAScript Function Bind Syntax ैདྷ͸͜Μͳॻ͖ํͩͬͨ΋ͷ͕… var hasOwnProp = Object.prototype.hasOwnProperty; var

    obj = { x: 100 }; hasOwnProp.call(obj, "x");
  34. ECMAScript Function Bind Syntax ͜͏Ͱ͖Ε͹ྑ͍Μ͡Όͳ͍?ͱ͍͏΋ͷΒ ͍͠ var hasOwnProp = Object.prototype.hasOwnProperty;

    var obj = { x: 100 }; obj::hasOwnProperty(key);
  35. Encapsulated private state for objects

  36. Encapsulated private state for objects Class಺Ͱ͔͠࢖͑ͳ͍privateঢ়ଶΛ࡞Γ·͠ ΐ͏ͱ͍͏ఏҊɻStage0ɻ ͓ݻ͍ݴޠʹͳͬͯ͘Δ͔?Yehuda Katz͞Μ͕ ؤுͬͯΔΑ͏Ͱ͢ɻ

  37. Encapsulated private state for objects class DataObj { private #data1;

    constructor(d) { #data1 = d; } sameData(another) { return #data1 === another.#data1 } }; let obj1= new DataObj(1); let obj2 = new DataObj(2); console.log(obj1.sameData(obj2)); // false consloe.log(obj1.sameData(new DataObj(1))); // true
  38. 64-Bit Integer Operations

  39. 64-Bit Integer Operations JavaScriptͷ͓෕͞Μ͜ͱBrendan Eich͞Μ͕ 64bitͰܭࢉ͠Α͏ͥ!ͬͯग़ͯ͠ΔఏҊɻ ͿͬͪΌ͚͜͜Βลྑ͘෼͔Γ·ͤΜɻ Stage0ɻ

  40. 64-Bit Integer Operations ·Μ·ൈਮɻ // return the high 32 bit

    part of the 64 bit addition of (hi0, lo0) and (hi1, lo1) Math.iaddh(lo0, hi0, lo1, hi1) // return the high 32 bit part of the 64 bit subtraction of (hi0, lo0) and (hi1, lo1) Math.isubh(lo0, hi0, lo1, hi1) // return the high 32 bit part of the signed 64 bit product of the 32 bit numbers a and b Math.imulh(a, b) // return the high 32 bit part of the unsigned 64 bit product of the 32 bit numbers a and b Math.umulh(a, b)
  41. ΢Υονͱ͔ίϯτϦϏϡʔτ͢Δͱ ָ͍͔͠΋͠Ε·ͤΜͶ!!

  42. Thank you ;)