I'm using it now as my primary browser.
302 karma · joined August 29, 2009
I'm using it now as my primary browser.
I think jsig's role is more to describe JavaScript, rather than to say the language is "doing it wrong"
However TypeScript was optimized for building tooling. It also requires changing the actual executable code you write and investing in a workflow around the TypeScript compiler. With jsig, you just write a comment. My experience working almost exclusively in Node.js for the past year as shown me that plain JavaScript and minimal IDE support is sufficient if you embrace a philosophy of small, self-contained, loosely-coupled modules, each with their own tests and documentation. Writing this documentation in a clear way has been a pain point for me, however. jsig grew out of some of the conventions we've been using on my team to address the ad hoc or underspecified documentation we've dealt with.
With TypeScript, it's possible to write just in JavaScript and keep your TypeScript declarations in an external file (see, for example, [TSD](https://github.com/Diullei/tsd)) - but this is impractical. Plus, TypeScript does not support generic types, which are especially convenient for things like Callback<Buffer> or Promise<Buffer>.
The surface area is `.then()`
At any rate, JavaScript is not built around having a monolithic base library, and as others have pointed out, it would not make sense to have language level support for promises per se.
However, I do agree that it would be great to have host APIs, for example, DOM, to make more widespread use of promises. In fact, WinJS for Windows 8 _does_ make use of promises in their async APIs.
My Lumia 920 got here today, and the two gripes I had before - lack of 4g and a pitiful browser - have both been nicely addressed.