Toward Modern Web Apps with ECMAScript 6
sencha.com
sencha.com
It's only been like 10 years already (since those features were promised for ES4), no need to move faster, please participating companies, take your time debating BS pedantic distinctions until the spec is finalized. Then it would only take 3-4 years until it has around 90% penetration so it can be used.
It's not like 14-15 years is a lot of time in technology. Perhaps only one generation of web programmers will have retired by then.
Just look how long C++11 took to finish or the features that are being discussed for C++17.
Or the first C standard 1989, when the language existed since 1972. Or how many C compilers, commercial and open-source, implement C11.
Many many other examples are possible.
Last time around, a few stakeholders (mostly MS, but also Yahoo and Google) managed to railroad the proposal completely resulting in the watered down ECMAScript 5.
And don't forget that IE6 was Microsoft's latest and greatest for a long time, with little prospect of an upgrade. When IE progress was frozen with huge market share, the prospect of updating JS seemed like a pipe dream.
AS3 (which completely conforms with the ES4 draft specification) is a lot nicer to use than JavaScript (ES5.1 included). It gives you means to organize your code and your tools also have a clue what you're doing.
TypeScript is very similar.
OTOH if things are rushed then you end up with underdefined oddities and weird effects of things that seemed sensible: http://wtfjs.com/page/13
But it's a false dichotomy, I'd say: nothing prevents them from being more agile and correcting any issues that is found in the spec in a dot update. A few people will have to update their code, or use some conditional code, big fucing deal.
Or they could, you know, provide a reference implementation -- e.g working with Mozilla or anyone interested.
Release it as an opt-in engine (e.g with something like "use strict") fix any issues that arise for 1-2 years, and make it a finalized standard from the on.
On a more serious take: as a Node.js developer I can't wait for generators to be ubiquitous!
I'm also doubtful how well DOM programming can be mixed with a functional approach, but i'll concede that it is at a minimum possible to do it.
So it does not matter what Firefox or Chrome support on the desktop, if those features are not widespread on the mobile platforms.
You cannot assume everyone has a mobile device with the latest Firefox or Chrome version installed.
Most people only use the system browser, which can be whatever Webkit version depending on the iOS or Android version, Bink or mobile IE.
Some people might install the mobile versions of Firefox.
So as always, one is quite constrained if the goal is to target any mobile device with the same codebase.
It's very interesting and tempting but would end up as a loss of time if they are not.
{ "small": 2, "large": { "bignum": "-9223372036854775807.4237482374983253298159" } }
Then make sure to replace or treat the object as a big number. Granted, it is more busywork.
The fact that you can't install IE11 on Windows 2000 is irrelevant. I can't install Safari on my Windows machine anymore either, and it's still a HTML5 browser (albeit a bad one, the last time I tried it on a Mac).
Users not installing updates isn't relevant either.
IE is a perfectly respectable HTML5 browser. It runs my HTML5 games better than Opera or Safari and has fairly comprehensive support for non-bleeding-edge features, especially if you look at 11 (coming out soon, I believe).
var fs = require('fs');
fs is such an easy name to give to any random variable in a function
function foo() { var fs = 88; // just overwrote fs module.. }
I do two things in my non-standard way...
const FS=require('fs');
it makes more sense to me... i'm less likely to write in a random function:
function foo() { var FS = 88; }
Just my thought... node.js supports const for a long time I wish examples would use it for required modules...
const is really just a readonly. It would prevent you from accidentally overwriting fs if you were to forget to type var at some point.
More needs to be written about when to use const, because there isn't much explanation for it out there. It seems like engines can better optimize some code if it knows certain variables won't be reassigned. But in that case you mind up always using const, which I doubt is correct either. There has to be some overhead to using const, so you probably wouldn't want to use it in a tight loop, for example. Or maybe I'm all wrong about this. Need some writing.