4 ms·
As somebody who has been writing an Angular2 app in ES6, it kind of saddens me that Google has gone all-in on Typescript despite it's glaring departure from fut
by EvanPlaice 11y ago
As somebody who has been writing an Angular2 app in ES6, it kind of saddens me that Google has gone all-in on Typescript despite it's glaring departure from future web standards.
Specifically, the parameter annotation syntax they use is much different from that proposed in the future ES7 spec.
I really like Angular2 but it's hard not to feel like it was created as a promotional tool for Typescript adoption.
Types in JS are mostly 'window dressing' to protect devs from themselves and allow for better autocomplete support. They come with a performance overhead so they'll be disabled in production anyway.
Anyway, it's very interesting that Op went with Redux. Redux is pretty game changing in terms of reducing the feedback cycle between changes. Hopefully, better Redux support in NG2 is forthcoming.
- Matthias247 11y agoTypes come with a performance overhead and will be disabled in production? Sorry, I don't understand that. Typescript transpiles to plain JS, so there are no types at runtime no matter whetzer you are developing or in production. And therefore there is also no performance overhead. The only overhead I can think of is if you are transpiling code at runtime instead of build time using some JSPM plugin - but then the overhead is not related to types but to transpiling (it would also be there for typeless coffeescript transpiling). And I also thought that typescript decorators are explicitily following the most recent ES7 decorator proposals and are even marked as experimental in TS to be able to react to changes if the ES7 syntax changes.