2 ms·
TypeScript is overly complicated and for what? Compile-time "safety". It's better than plain JavaScript, though whatever library I pull as a dependency and peek
by harha_ 2y ago
TypeScript is overly complicated and for what? Compile-time "safety". It's better than plain JavaScript, though whatever library I pull as a dependency and peek inside the TypeScript<>JavaScript interface glue, I always find horrors beyond my comprehension.
- mynameisvlad 2y ago> the TypeScript<>JavaScript interface glue … the typing file? That’s literally the only thing that’s different and if the original codebase was written in TS then is literally the types they defined.
- harha_ 2y agoWell either the typing glue or the library itself if it's written in TypeScript. My point was: the types are too damn complicated. Way too complicated for what they achieve. Almost always.
- xamuel 2y agoCompile error messages in a classical typed language: "Error: Object of type 'StructA' cannot be assigned to variable of type 'StructB'" Compile error messages in TypeScript when you use a library like React: "Error: Cannot reconcile <5 pages of arcane gibberish> with <5 pages of different arcane gibberish>"