Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Well, there once was a forlorn EcmaScript version, aka ES4, which included rather similar concepts ( http://www.ecmascript.org/es4/spec/overview.pdf ) :

> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: