2 ms·
> typing doesn't really help with runtime bugs unless it's a strongly typed language I’m skeptical of this research. Typescript prevents runtime bugs for me da
by solumunus 3y ago
> typing doesn't really help with runtime bugs unless it's a strongly typed language
I’m skeptical of this research. Typescript prevents runtime bugs for me day in day out. It also allows me to produce much more elegant and flexible solutions which would be infeasible in plain JavaScript. When people say there is no significant benefit compared to JavaScript it almost feels like I must be on a different planet or something. I would love to see what kind of code these people are working with, or how they’re attempting to leverage the type system.
- kazinator 3y agoWould you still favor Typescript if it was an actual static language: such that a type problem not caught by Typescript potentially corrupted memory and crashed the browser or Node.js instance?
- nyssos 3y ago> such that a type problem not caught by Typescript potentially corrupted memory What does this have to do with static types? High-level languages, typed or untyped, are generally memory-safe. They'd need a very good excuse not to be. If Haskell isn't a "real" statically typed language, nothing is.
- kazinator 3y agoA True Scotsman's statically typed language is not safe if the type system is defeated; then it's up to the programmer to ensure safety. TypeScript is not this; it's a type checking layer over a dynamic language.