4 ms·
Which is exactly the same situation that Javascript is in now. The Javascript VM in Firefox has features that are not part of any web standard, nor part of a sp
by cwp 13y ago
Which is exactly the same situation that Javascript is in now. The Javascript VM in Firefox has features that are not part of any web standard, nor part of a spec that has interest from multiple vendors.
- azakai 13y agoWhat specifically do you refer to?
- ahoge 13y agoYea, Firefox 2.0+ is shipped with support for generators/iterators, array comprehension, let, and destructuring assignment: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.7 https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_... Firefox 3.0+ added support for expression closures and generator expressions: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8 https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_... Firefox 22+ supports fat arrow functions. Just open the console and try it yourself: >>> let z = x => x * x; undefined >>> z(5); 25 >>> let y = (a, b) => a * b; undefined >>> y(2, 3) 6 None of these features are standardized yet.
- azakai 13y agoThere is a spec and discussion in the standards bodies for all of those AFAIK. For example for let, http://wiki.ecmascript.org/doku.php?id=harmony:let http://wiki.ecmascript.org/doku.php?id=harmony:let Arrow functions are being standardized as well, http://wiki.ecmascript.org/doku.php?id=harmony:arrow_function_syntax http://wiki.ecmascript.org/doku.php?id=harmony:arrow_functio... and for generators, the standards discussion led to a change in the spec, with the new version replacing the old implementation in SpiderMonkey (v8 recently implemented the new one as well). In general see http://kangax.github.io/es5-compat-table/es6/ http://kangax.github.io/es5-compat-table/es6/ where it lists compatibility for various new JS features. As it says there, let is supported not just in Firefox but also IE11 and Chrome 30. It is true that Firefox shipped some of these several years back. I am not sure of the best way to find out exactly what the standards-track status was at those times. But in general: Talking about the far past is counterproductive. We can probably find stuff that wasn't done properly by any browser if we look back far enough. But in recent years, there is growing consensus on the importance of not shipping non-standard things. That is the important thing I think.
- rdtsc 13y agoUnfortunately, though, this kind of goes against your argument which I understand to be "how dare Google release something that is not standards based". I agree principle with that, _but_ in this case a few posts did show example of technologies that all browser vendors introduces that were outside the spec. > But in recent years, there is growing consensus on the importance of not shipping non-standard things. Others might read that as no new and meaningful technologies will be seen implemented in the browsers soon. I can't think of too many thing designed and build by an intercompany commetee.
- azakai 13y agoI don't follow, why does it go against that line of argument? If someone else did something bad in the past, it doesn't excuse doing something bad in the present. (And as mentioned above, I'm not sure about those examples - while it's very possible some were released before being standardized, I didn't see a link showing that, and they are all being standardized now. Need more info.) Fair point about the limits of things designed by committees. But it isn't always true, just mostly true ;) For example, WebGL was designed through a standards process, and it is great.
- ahoge 13y ago> If someone else did something bad in the past [...] Earlier you mentioned "far past", but this stuff is fairly recent: Firefox 2 - October 24, 2006 Firefox 3 - June 17, 2008 Firefox 22 - June 25, 2013 > while it's very possible some were released before being standardized Nothing of this is in ES5.1. > they are all being standardized now Yes, just like Dart. > For example, WebGL was designed through a standards process, and it is great. No, that's not how it happened. [1] Experiment by Mozilla - 2006 Implementations by Mozilla and Opera - 2007 WebGL Working Group - 2009 1.0 spec - 2011 And all of this is based on Canvas which is something Apple made up. Anyhow, you seem to think that this kind of thing is a problem. It's not. This is how the web works. This is how progress is made. [1] http://en.wikipedia.org/wiki/WebGL#History http://en.wikipedia.org/wiki/WebGL#History
- trycatch 13y agoAnd Firefox actively _removes_ these features. For example, sharp variables were removed in Firefox 12, E4X was removed in Firefox 20.