4 ms·
What's your argument here? For example, Typescript allows lots of operations on objects that cannot be known at compile time because it relies on the user to i
by terminalbraid 2y ago
What's your argument here? For example, Typescript allows lots of operations on objects that cannot be known at compile time because it relies on the user to inform it of types accurately, anything can be coerced into anything without complaint with "as", and it allows for arbitrary operations on an "any" type without complaint.
I've heard it referred to it as an "optionally typed" or "gradually typed" system, which, having worked for years in Typescript and other languages like Rust and Kotlin, etc, I agree with.
- terandle 2y agoPretty easy to add runtime validation at the edges with Zod https://github.com/colinhacks/zod https://github.com/colinhacks/zod Great thing is that the zod schema also doubles as your typescript type so you don't have to write a duplicate/shadow TS type definition.
- terminalbraid 2y agoThat doesn't make Typescript as a language "strongly typed".
- deleted 2y ago[deleted]