> If you want statically typed JavaScript you are always going to need something like TypeScript.
I think that is a valid statement only within the context of the next ECMA release. In other words, that's not to say that whichever successive version after ES6 can't include it, or any version thereafter.
You could make that argument about any missing feature. I haven't seen any serious support for optional typing in JS; so at this point it would be fair to say that GP is correct.
> Structural function types describe functions and methods. The type
> function (int, string): boolean
> describes a Function object that takes two arguments, one int and the other string, and which returns a boolean
Given that a great many other concepts from ES4 are finding their ways into ES6, it is not implausible that this one may also reappear into a more consensual specification someday.
That is a good point that it could apply to any missing feature; my point is that to say that any particular feature is "never" going to make it into the language is short-sighted at best. Just a handful of years ago, you could say that "if you want some form of Function.prototype.bind then you're always going to have to polyfill it yourself", which of course would be a 100% inaccurate statement.
Fair enough. I just haven't heard of the ECMAScript standards committee seriously considering adding static type checking to the language. The closest things I've seen are the proposed guards [1] and trademarks [2] features for ES7.
I think that is a valid statement only within the context of the next ECMA release. In other words, that's not to say that whichever successive version after ES6 can't include it, or any version thereafter.