Aside from the overhead of adding types to your code, there are zero downsides to type-safety enforcement.
Au contrarire, the downsides of type-safety are too many compared to any benefits TS may have:
Makes your code more verbose and unreadable due to various type declarations.
Makes your code less expressive and more rigid.
Not a W3C standard, imposed by a single corporation (Microsoft).
The Buddha's way is to face your maladies directly instead of creating abstractions around them. I'd rather write my code in ES6 than write TS and then convert to ES6!
Head of Product at Temporal. Previously lead architect and low-level systems programmer for scale out SaaS offering. Game engine developer, ML engineering expert. DMs open on Twitter.
Makes your code more verbose and unreadable due to various type declarations.
Incredibly subjective.
Makes your code less expressive and more rigid.
I'm actually not sure how a typing system could make code "less expressive". Can you provide an example?
Not a W3C standard, imposed by a single corporation (Microsoft).
The language is open source, the spec of the language is open web. This statement entirely misrepresents TypeScript. Would you tell people not to use Java because it was created by Sun (now Oracle)? What about C#? What about JavaScript, a current trademark of Oracle?
The Buddha's way is to face your maladies directly instead of creating abstractions around them. I'd rather write my code in ES6 than write TS and then convert to ES6!
Au contrarire, you should be writing V8 bytecode. Or maybe even just skip all abstractions and send 1's and 0's via electrical current.
Au contrarire, the downsides of type-safety are too many compared to any benefits TS may have:
The Buddha's way is to face your maladies directly instead of creating abstractions around them. I'd rather write my code in ES6 than write TS and then convert to ES6!
Incredibly subjective.
I'm actually not sure how a typing system could make code "less expressive". Can you provide an example?
The language is open source, the spec of the language is open web. This statement entirely misrepresents TypeScript. Would you tell people not to use Java because it was created by Sun (now Oracle)? What about C#? What about JavaScript, a current trademark of Oracle?
Au contrarire, you should be writing V8 bytecode. Or maybe even just skip all abstractions and send 1's and 0's via electrical current.
:)
I disagree on this point.
The Buddha would want you to “communicate mindfully” and to speak clearly. Types clarify reality which is what Buddhism teaches to respect:
“Communicating your needs” / TypeScript’s value from a Buddhist perspective (part 1)
Cubicle Buddha ・ May 29 ・ 4 min read