4 ms·
I wouldn't really say Typescript is enforceable, given that the types aren't actually considered at runtime.
by fastball 2y ago
I wouldn't really say Typescript is enforceable, given that the types aren't actually considered at runtime.
- pjmlp 2y agoIn fact, people should see Typescript as a linter / bundler tool than a programming language by itself, ignoring the design mistakes of how enums and namespaces came to be.
- pyrale 2y agoThat is the case for most typesystem considered safe, save for introspection use cases. For instance, haskell, a language with strong type guarantees, does erase types for runtime.
- School-Cotton 2y agoAlmost no languages have types considered at runtime.
- guappa 2y agoWell python does, after the famous PEP to pack all types into strings got parked (probably forever). There's packages to typecheck at runtime, even to check the parameters to a function.
- deleted 2y ago[deleted]