3 ms·
It's a pity that optional types are still missing in ES6. As I wrote: A good example is Facebook's Hack language that improve PHP in a sensible way and adds op
by frik 12y ago
It's a pity that optional types are still missing in ES6. As I wrote:
A good example is Facebook's Hack language that improve PHP in a sensible way and adds optional typing - something that would be great for ES6/7.
In comparision the Java/C# type is static at compile time. Newer C# version have like e.g. Visual Basic 6 a variant type that is a tradeoff (as wasteful as a "union struct" in C).
The class syntax in ES6 is just syntactic sugar. JS IDEs like WebStorm/PHPStorm/IDEA already can parse "classes" with JS5 syntax .
But what about the arrow syntax:
var odds = evens.map(v => v + 1);
Or the iterator syntax that ES6 got from TypeScript:
interface Iterable {
[Symbol.iterator](): Iterator
}