Re: Could delete methods rename to remove?

2013-12-18 Thread Shijun He
On Wed, Dec 18, 2013 at 1:55 PM, Rick Waldron waldron.r...@gmail.comwrote: Submit patches—libraries intended for use in IE8 should be made to support that platform, it's that simple. Submitting patches is irrelevant and impractical here. Why use es5-shim? Because we want to use some scripts

Re: Could delete methods rename to remove?

2013-12-18 Thread David Bruant
Le 17/12/2013 22:52, Alex Kocharin a écrit : I believe ecmascript isn't versionless yet like html is, and that number means something. As far as I'm concerned, ECMAScript is versionless. As versionless as HTML. Implementation aren't monolithically moving from one standard version to the

Could delete methods rename to remove?

2013-12-17 Thread Shijun He
There are some methods using reserved word delete, such as Map.prototype.delete, Set.prototype.delete... Though it is allowed since ES5, I think we'd better avoid it because it cause es6 shim solution fail on legacy browsers such as IE8. -- hax ___

Re: Could delete methods rename to remove?

2013-12-17 Thread David Bruant
Le 17/12/2013 10:19, Shijun He a écrit : There are some methods using reserved word delete, such as Map.prototype.delete, Set.prototype.delete... Though it is allowed since ES5, I think we'd better avoid it because it cause es6 shim solution fail on legacy browsers such as IE8. Note that there

Re: Could delete methods rename to remove?

2013-12-17 Thread Rick Waldron
On Tue, Dec 17, 2013 at 4:19 AM, Shijun He hax@gmail.com wrote: There are some methods using reserved word delete, such as Map.prototype.delete, Set.prototype.delete... Though it is allowed since ES5, I think we'd better avoid it because it cause es6 shim solution fail on legacy browsers

Re: Could delete methods rename to remove?

2013-12-17 Thread Andrea Giammarchi
sorry what ? https://github.com/WebReflection/es6-collections#es6-harmony-collections-fast-polyfill https://code.google.com/p/es-lab/source/browse/trunk/src/ses/WeakMap.js https://github.com/Benvie/ES6-Harmony-Collections-Shim https://github.com/paulmillr/es6-shim

Re: Could delete methods rename to remove?

2013-12-17 Thread Andrea Giammarchi
not shold but **does** work ;-) Although I agree that specific thing is very inconvenient in some case and minifiers knows this too. As example, google closure compiler fails with this script in two ways ```javascript var wm = new WeakMap; wm.delete(Object); ``` Simple minification does the

Re: Could delete methods rename to remove?

2013-12-17 Thread Alex Kocharin
 You can't run any ES6 script in a browser that don't support ES6, because they will throw syntax error at the first yield (unless you're using compiler like traceur, but it won't have a problem with getting .delete work either). If you use shims, that's fine, but you're not writing ES6, you're

Re: Could delete methods rename to remove?

2013-12-17 Thread Alex Kocharin
 ES6 scripts will not work in IE8. Period. What's the point of making it work with a bit more ES6 scripts since all of them will never be supported anyway? I would only welcome if that badly written or outdated software gets exposed this way.  17.12.2013, 22:59, "Andrea Giammarchi"

Re: Could delete methods rename to remove?

2013-12-17 Thread Andrea Giammarchi
IE6 ? ... I don't understand your argument. We are talking about IE8 and polyfills that work already plus this does not solve the main problem which is about tools not always compatible with ES6 and/or future proof and shim aware. If tools were OK you wuld just write wm.delete(obj); and the tool

Re: Could delete methods rename to remove?

2013-12-17 Thread Alex Kocharin
 Well, you said that it works in IE8, and I don't care enough to test it, so said about IE6 because it is the same legacy kind of thing. Doesn't matter. Legacy and broken tools is not a valid reason to avoid perfectly good method name, especially considering the fact that it is a valid ES5 syntax

Re: Could delete methods rename to remove?

2013-12-17 Thread Andrea Giammarchi
That's why my first hint was .del() as it is in Python and makes sense since ever and it could have made perfect sense in JS too, also as alias for .delete() while transitioning from ES3 legacy, ES5 quirk engines, and ES.next That being said, I was simply warning that tools might break so this is

Re: Could delete methods rename to remove?

2013-12-17 Thread Shijun He
You may not care about IE8, but many developers in the world MUST care about it. What I suggest is to help ES6 be faster to adopt, you know most team in companies are conservative to edge tech, that's why we need es5-shim or es6-shim projects. It's too bad to write map['delete'], and you can't

Re: Could delete methods rename to remove?

2013-12-17 Thread John Lenz
ADVANCED mode requires property definitions for external properties. There aren't ES6 definitions in the default externs for Map or other new features. On Dec 17, 2013 10:59 AM, Andrea Giammarchi andrea.giammar...@gmail.com wrote: not shold but **does** work ;-) Although I agree that specific

Re: Could delete methods rename to remove?

2013-12-17 Thread Alex Kocharin
  such name just trouble the developers who want to migrate to ES6 step by step How can you migrate to ES6 if you didn't even migrate to ES5 first?  18.12.2013, 07:17, "Shijun He" hax@gmail.com:You may not care about IE8, but many developers in the world MUST care about it.What I suggest is to

Re: Could delete methods rename to remove?

2013-12-17 Thread Shijun He
On Wed, Dec 18, 2013 at 11:30 AM, Rick Waldron waldron.r...@gmail.comwrote: Right, and map[delete](key) works fine. The future of the language itself should not be impaired by a browser that has an expiration date. No, it does NOT work. Because you can't ask all module/library authors write

Re: Could delete methods rename to remove?

2013-12-17 Thread Shijun He
On Wed, Dec 18, 2013 at 11:28 AM, Alex Kocharin a...@kocharin.ru wrote: How can you migrate to ES6 if you didn't even migrate to ES5 first? Even IE5 (pre-ES3) can use string.prototype.repeat with simple shim. And with es6 shim, Map/Set SHOULD works on IE5, and all modules depend on Map/Set

Re: Could delete methods rename to remove?

2013-12-17 Thread Rick Waldron
On Tue, Dec 17, 2013 at 10:45 PM, Shijun He hax@gmail.com wrote: On Wed, Dec 18, 2013 at 11:30 AM, Rick Waldron waldron.r...@gmail.comwrote: Right, and map[delete](key) works fine. The future of the language itself should not be impaired by a browser that has an expiration date.

Re: Could delete methods rename to remove?

2013-12-17 Thread Rick Waldron
On Tue, Dec 17, 2013 at 11:02 PM, Shijun He hax@gmail.com wrote: On Wed, Dec 18, 2013 at 11:28 AM, Alex Kocharin a...@kocharin.ru wrote: How can you migrate to ES6 if you didn't even migrate to ES5 first? Even IE5 (pre-ES3) can use string.prototype.repeat with simple shim. And