4 ms·
Though in principle they serve similar purposes there are some big differences though. Python with types is still just python. Typescript is a different languag
by nurbl 1y ago
Though in principle they serve similar purposes there are some big differences though. Python with types is still just python. Typescript is a different language from JS (guess it a superset?) and it being controlled by a large company could be considered problematic.
I suppose JS could go in the same direction and adopt the typing syntax from TS as a non-runtime thing. Then the typescript compiler would become something like mypy, an entirely optional part of the ecosystem.
- motorest 1y ago> Python with types is still just python. Typescript is a different language from JS (guess it a superset?) No, it's the exact same thing. TypeScript adds support for type annotations, and removing these annotations leads to JavaScript. See how Node.js added support for TypeScript by implementing type stripping in v22. https://nodejs.org/api/typescript.html#type-stripping https://nodejs.org/api/typescript.html#type-stripping
- joquarky 1y agoIf your IDE supports JSDoc, then TS isn't needed for basic type constraints. https://jsdoc.app/ https://jsdoc.app/