Re:Strong typing, a hill I'm willing to die on
by kazinator on Thursday October 05, 2023 @04:58PM
(#37784214)
Would 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?
Re:Strong typing, a hill I'm willing to die on
by nyssos on Friday October 06, 2023 @10:57PM
(#37798632)
> 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.
Re:Strong typing, a hill I'm willing to die on
by kazinator on Friday October 06, 2023 @11:16PM
(#37798736)
A 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.
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.