Download PDF

TC39 MTG Notes 第43回 報告会

2014-11 のミーティングノートより


4.3 Assignment to a const: static error?

  • ES6のconstで定義した変数への代入はエラーに
    • 今まではstrict modeの時のみだった
  • strict mode / non-strict mode( sloppy mode)どちらもエラー
  • Rationale for const not throwing in sloppy mode?
const x = 42;
x = 32;// Error!!!

4.3 Assignment to a const: static error?

  • だがES5でundefinedへの代入等はnon-strict modeでは何も言わない
  • 代入しても無視されるだけでエラーが出ない
  • これは引き続きES6でも同じ仕様をが維持される

"don't use strict";
// もちろんstrict modeならエラー
Object.defineProperty(this, "globalReadOnly", { value: "readonly" });

var func = function f() {
  // silently skips assignment
  f = undefined;
  // silently skips assignment
  undefined = 42;
  Infinity = 0;  
};
func();

4.6 Zepto broken by new this.construct usage in some Array.prototype methods

  • new this.constructor() がES5と互換なくなってたのは直す
  • ZeptoやPromiseのサブクラス的なもので見かける

5.1 & 4.4 Array.prototype.contains and String.prototype.contains

  • Array.prototype.containsはBreak the Web
    • includesに変更!
  • String.prototype.contains => String.prototype.includes
  • Array.prototype.contains => Array.prototype.includes

Array.prototype.containsの変更

  • ECMA, TC39 Meeting 2014-11のメモ | GH Issue Note
  • ブラウザベンダーは大体当日にIssue立てて解決済み

4.10 RegExp subclassing fixes

  • RegExp.prototype.flags というflagを取るメソッドを追加
  • /test/i.flags // i ?

4.12 Should WeakMap/WeakSet have a .clear method? (MarkM)

  • WeakMap と WeakSet から clearメソッドが消えました
  • Allen Wirfs-Brock on Twitter: "ES6 WeakMap and WeakSet 'clear' methods eliminated"
  • 実装に考慮した感じっぽい

Abstract references as a solution to LTR composition and private state

  • icon,inline zenparsing/es-abstract-refs
  • ビルドインオブジェクトをprivateに拡張するための抽象インターフェスの定義の提案

5.6 Object.observe: proposal to move to Stage 3.

  • :star: Object.observe がES7 Stage 3へ
  • 恐らくObject.observeが最初のStage 3
  • 参照: 明日には使えなくなるES7トーク

5.4 I/O Streams as part of the ES standard library

  • StreamをECMAScriptに入れるかどうかの話
  • 入れたいとは思うが現状では難しい
  • I/Oとかそういうものの標準があるならばあるいは
  • 現在はWHATWGで管理してるので仕様団体的な議論
  • 結局今は無理なので提案は撤回

成果

inline,fill

  • https://github.com/rwaldron/tc39-notes/pull/25
  • https://github.com/rwaldron/tc39-notes/pull/24

おわりに

  • TC39 MTG Notes MTG | Doorkeeper
  • 読む時毎回イベントを立てていく予定
  • オンラインでTwitterに #TC39MTG とつぶやくだけ
  • 今回: ECMA, TC39 Meeting Notes 第43回目を読む - TC39 MTG Notes MTG | Doorkeeper