4 ms·
> Python is more type safe due to run time type checks How could Python's runtime type checks be more safe than Typescript's completive type checks? Nobody san
by golergka 3y ago
> Python is more type safe due to run time type checks
How could Python's runtime type checks be more safe than Typescript's completive type checks? Nobody sane uses typeless Javascript for serious business logic now anyway.
- winrid 3y agoFastComments main backend is around 200k lines of plain JS. I do extensively use JSDoc however.
- winrid 3y agoAlso, TS type checking is not at run time (with NodeJS). So some library could allow unsanitized data as a wrong type etc. at least with Python it'd fail fast.
- golergka 3y agoLibraries like io-ts make it trivial to write type definitions once and use them both for both static and runtime checking.
- winrid 3y ago> Libraries like But this is already solved by so many other runtimes... Without a library..
- golergka 3y agoThat's why I love js ecosystem. If something is implemented in language itself, runtime or standard library, it will never meaningfully develop.
- winrid 3y agoIt doesn't need to be developed... An int isn't going to store a String in Java because of a bug, that doesn't require further development.