Well, but here's the thing: how can a person write code for this beast if it doesn't follow the spec and doesn't provide any guidance for where it is going to diverge? It's not helping anyone if we have to write and constantly refer to a cheat sheet of arbitrary divergences from even the simplest parts of the language design.
Don't get me wrong, I completely understand the idea of a motivated language subset, but arbitrarily outlawing a => (b) => x while allowing (a) => b => x, or forbidding while (a = b, c) while allowing if (a = b, c), what's that even for? Either these are bugs (and, with several language implementations under my belt, they seem more likely to be typos in the parser source than anything else), or some detailed documentation is needed so that users can know what is going to work and what is not and develop an intuition for why.
As to why I'd appeal to the ECMA spec, it's not demented legalism on my part, it's that I've already noticed that people get yelled at if they don't. Indeed, it happened to me today—I'd assumed that everyone knew what the comma operator does in C-family languages, but apparently chapter and verse is required.
© Espruino, powered by microcosm.
Report a problem