`function f(x = void String) { return typeof x !== 'string' || typeof x === 'undefined'; } assert(f(3))` is code that might stop working properly if `void String` changes from being `undefined` to literally anything else.
2018-06-03 22:01 GMT-07:00 YU HengChun <achun....@qq.com>: > Strictly speaking, the behavior is different. > > However, can you provide me with a real, conflicting example? > > Or you give me an example, I write a version of the proposal, you can test > whether it is really harmful. > > > If it is finally proved that the semantics are different, but it is indeed > harmless, it is normal to add new semantics. > > In fact ECMAScript has been enriching semantics. > > 严格意义上讲, 这个提案的确产生了不同的语义行为. > > 但是, 你能举一个真实的例子来说明这个提案会产生为哈么? > > 或者, 你给我一个例子, 我用提案的写法写一个版本, 你可以测试下是否真的有危害. > > 如果最终证明虽然语义不同, 但的确是无危害性的, 那么添加新的语义是很正常的. > > 事实上 ECMAScript 就是在不断的丰富语义啊. > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss