3 ms·
This why I find Typescript frustrating. It really should be called "vaguely typed script"
by worik 1y ago
This why I find Typescript frustrating.
It really should be called "vaguely typed script"
- culi 1y agoit's gradually and structurally typed and I think that's what makes it great. I also disagree that it's vague. Nowadays you can even have typesafe regex
- shepherdjerred 1y agoTypeScript is incredibly safe if you use strict tsc settings and ts-eslint strict presets. If it were this strict out-of-the-box, it probably would have been hated since most devs don't really want to deal with static typing. https://typescript-eslint.io/getting-started/typed-linting https://typescript-eslint.io/getting-started/typed-linting
- worik 1y ago> TypeScript is incredibly safe I expect this comment is from a person who has not used strongly typed languages extensively. Is that true? When "1" == 1, and "1" can cross a wire and be assigned to a number, when there are no ints... Perhaps I have not given Typescript enough rope, I only spent eighteen months immersed It is not shit, but it is very outdated IMO. I have been known to be wrong, I admit, but all these "unconventional " casts, together with the standard ones, are exactly what frustrated me
- evilduck 1y agoWell for one, using double equals is evidence you don’t know JS well enough. Many years before Typescript came along the JS community was prohibiting “1” == 1 style coercions.
- jakubmazanec 1y agoOn the other hand, you can run Doom in TypeScript's type system.
- scotty79 1y agoI'd call it an "actually usefully typed script for people without a stick up their butt" but that's a mouthful. TypeScript will do.