4 ms·
> getting things done quickly and easily Sure, fast turnaround is good. Being able to maintain and refactor what you made a year later is even better. I'm curr
by DCoder 10y ago
> getting things done quickly and easily
Sure, fast turnaround is good. Being able to maintain and refactor what you made a year later is even better. I'm currently refactoring an app that has ~30k sloc TypeScript, and doing it without types would be a lot worse.
However, my app is not built in Angular, so my experience here may be quite different.
- abalashov 10y agoI'll buy that. I'll also buy that the discipline of TS—like Java—is useful on large enterprise projects and/or on large teams, especially if the aim is to limit the amount of damage that can be done by ordinary J2EE H1Bs at Accenture. But that's no reason to force its use as a precondition of using a notionally JS framework.
- jolux 10y agoIt's sort of sad that TS inspires comparisons to the bureaucratic, manifestly typed languages like the perennial Hacker News bashees C# and Java and not the graceful type inference of some functional languages. These languages being the face of strong static typing betray the ability of types to make a programming language both safer and more expressive.
- abalashov 10y agoI think it's a red herring. TS's typing isn't the only thing that is true about it, and is not the salient issue here. Were TS merely to force types upon me, I think I'd have few grievances with it. Yes, yes, I know—it's (2.x) a superset of ES6. But just you try writing Angular 2 code in such "ES6". No, you have to play ball with generics and the full gamut of Java features.
- jolux 10y agoI guess I don't understand why generics are "Java features?"
- deleted 10y ago[deleted]
- DCoder 10y agoGenerics are a pretty integral part of the type system, not a "Java feature". And TS has other good features besides types, e.g. transpiling to ES5, async/await, TSX, decorators. What does pure ES6 offer instead? I am avoiding Angular entirely (I'm not a fan of the "and the kitchen sink" approach it promotes), so I can't comment if they're taking TS too far.
- shados 10y agobecause it is closer to java or C# than it is to the more advanced functional languages. Yeah, it has structural typing, some type inference and pinky swearing type guards. It is better in those regards. But you still don't get very far without annotations. C# had inference for anonymous objects and return values too, and TypeScript is only a little further ahead on that one. Though the main problem with TS is how it actually gets used. You certainly CAN do java-like garbage with it, and god do people do. If you're not stuck with people doing that, it's not half bad.
- jolux 10y agoIt's just sort of a shame that TS is winning out over Flow. I remain convinced that the latter is better.
- shados 10y agoyup. Flow has a couple of annoying bugs (situations where the type checker ignores errors without warning you), and tooling and IDE integration is horrible. Plus windows support is still slow and buggy. Flow is my favorite too, i much prefer its type system, but its no surprise its "losing".
- jgalt212 10y ago> ordinary J2EE H1Bs at Accenture you probably don't see that phrase in their marketing materials.