Live data from Hacker News

Reservations about TypeScript

daviesgeek.com

1–10 of 34 posts

Re: Reservations about TypeScript

#2
Article lacks any actual, factual reservations, but rather complains about some code that didn't work a year ago and the code of course has been lost. I don't get the point of sharing this writeup. I guess author just posted some text he wrote up for a internal company discussion.

Opinions are like buttholes, everone has one.

Re: Reservations about TypeScript

#3

Article lacks any actual, factual reservations, but rather complains about some code that didn't work a year ago and the code of course has been lost. I don't get the point of sharing this writeup. I guess author just posted some text he wrote up for a internal company discussion. Opinions are like buttholes, everone has one.

I wish I had the actual code since it was pretty fun to write and break the compiler but it was too long ago. I am still gonna see if I can figure it out again.

I think I was pretty clear that it was all just my opinion :) If you read the end of the post I said that maybe I'm just worrying over something that's a non-issue, so by all means, steer me in the right direction rather than critiquing the fact that I'm expressing my opinions ;)

Re: Reservations about TypeScript

#4

Article lacks any actual, factual reservations, but rather complains about some code that didn't work a year ago and the code of course has been lost. I don't get the point of sharing this writeup. I guess author just posted some text he wrote up for a internal company discussion. Opinions are like buttholes, everone has one.

I'd like to also point out that my main issue (that JS itself doesn't have types, so it's impossible for TS to 100% enforce it) still stands even after a year.

Re: Reservations about TypeScript

#5
It's gradual typing. Yes, it's full of holes, that's the whole point.

There are other languages with strong, powerful type systems that compile to efficient JavaScript, such as (in order of power) Elm, OCaml, PureScript and Idris. Those four are just arbitrary examples however, there are quite a few more.

Re: Reservations about TypeScript

#6
First point: "I found a bug but can't give an example."

Second point: "It adds a feature that's different from a similar language."

These are not persuasive arguments. I'm not trying to be unkind, but the first point is totally unsupported and the second doesn't elaborate on what's bad about classes besides that another language also has classes.

Re: Reservations about TypeScript

#7
post #6

First point: "I found a bug but can't give an example." Second point: "It adds a feature that's different from a similar language." These are not persuasive arguments. I'm not trying to be unkind, but the first point is totally unsupported and the second doesn't elaborate on what's bad about classes besides that another language also has classes.

Definitely agree on the first, that's a good point. I probably should've been better about how I presented the data.

"TypeScript still compiles down to JavaScript. It has no way of actually checking types." That's my point. Maybe I should make it more obvious in the article :) I'm not complaining about the fact that TS has classes or types, it's that TS compiles down to a language that has neither.

Re: Reservations about TypeScript

#8
> TypeScript compiles down to JavaScript, which doesn’t have types or type checking, it’s impossible to have actual type checking. The TypeScript compiler is great at checking at compile time, but at the end of the day, it’s impossible to actually check the types.

I'll point out that C/C++/Haskell compiles down to Assembly, which doesn't have types or type checking. GCC/LLVM/GHC is great at checking at compile time, but at the end of the day, it's all just bits being modified...

Obviously you can find ways to break out of the type systems (void* cast?) but that's on you, and even if Typescript has more escape holes, the existence of them isn't an immediate fail

Re: Reservations about TypeScript

#10
post #6

First point: "I found a bug but can't give an example." Second point: "It adds a feature that's different from a similar language." These are not persuasive arguments. I'm not trying to be unkind, but the first point is totally unsupported and the second doesn't elaborate on what's bad about classes besides that another language also has classes.

Definitely agree on the first, that's a good point. I probably should've been better about how I presented the data. "TypeScript still compiles down to JavaScript. It has no way of actually checking types." That's my point. Maybe I should make it more obvious in the article :) I'm not complaining about the fact that TS has classes or types, it's that TS compiles down to a language that has neither.

TypeScript is certainly not flawless and there are tradeoffs. But this is not a good argument against TypeScript. The point of TypeScript and any other statically typed programming language is to have type checking performed statically, that is before the code is actually translated into machine instructions and run.
Post reply on HN