4 ms·
> And it lets one write plain old ES6, a luxury in this age of TypeScript fascism by psychopathic ex-JBoss villains. This opinion is one of the many things tha
by DCoder 10y ago
> And it lets one write plain old ES6, a luxury in this age of TypeScript fascism by psychopathic ex-JBoss villains.
This opinion is one of the many things that are wrong with the JavaScript ecosystem today. Static typing as provided by TypeScript is a safety net, not "fascism".
- abalashov 10y agoYes, but they completely undermine the appeal of JavaScript for getting things done quickly and easily for the JS-competent. If I wanted to write my JavaScript as bureaucratically as one writes Java or C#, I'd just use those languages. Also, Angular 2 claims to be TS vs. ES6 agnostic, but practically, all documentation and resources are TS-orientated. That's more what I meant by fascism. As far as the language premiums offered by TS: if I otherwise had to write ES5, I could see the value. With all the improvements offered by ES6—sure, type safety is not among them, but alas—I don't see any reason to use TS.
- 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.
- hexsprite 10y agoI don't see any reason not to use TypeScript as all of the type safety is totally optional depending on how you configure. So you can write freely but start adding types for critical pieces of code when it becomes worthwhile.
- Klathmon 10y agoAnd because someone doesn't like TypeScript doesn't mean they are "one of the many things wrong with the JavaScript ecosystem today".
- discreteevent 10y agoI was willing to take the fascism comment as a kind of humour but I downvoted him for calling the angular people sociopaths. In truth the boot is probably on the other foot.
- abalashov 10y agos/Angular/Angular 2/ And I'm happy to take alternate suggestions for what to call the Angular 2 "user experience".
- dang 10y agoI blanched at all that too, but decided it was probably intended satirically. > In truth the boot is probably on the other foot. Please don't stoop to personal attack, even in response to a bad comment. It just makes the thread worse.
- Gigablah 10y agoI dunno, maybe it was intended satirically.