Live data from Hacker News

TypeScript Won

medium.com

1–10 of 128 posts

Re: TypeScript Won

#2
Does anyone here have bad things to say about TypeScript?

I haven't used it for any large projects yet (couple toy ones) but seems pretty legit. Based on my anecdata, people who have used it at scale seems to like it.

I can't tell if that's because they're still in the honeymoon phase or if it really is a step forward for the long term.

Re: TypeScript Won

#3
On the topic of typescript vs purescript and similar projects, I believe these projects are more for people who want to stay in the same mindset across the whole stack. So haskell with ghjs or purescript and scala with scalajs... I dont think they are really in competition with typescript.

Re: TypeScript Won

#5
I love the piegonhole arguments that always 'exclude' Dart from these types of discussions.

Class-based vs prototype-based, classes will always win. JS is terrible, TypeScript is only very slightly better.

Dart's core team is absolutely world class, and the language is already highly capable.

Re: TypeScript Won

#6
post #2

Does anyone here have bad things to say about TypeScript? I haven't used it for any large projects yet (couple toy ones) but seems pretty legit. Based on my anecdata, people who have used it at scale seems to like it. I can't tell if that's because they're still in the honeymoon phase or if it really is a step forward for the long term.

In terms of Javascript targeting languages, Typescript has been the only one that hasn't made me want to murder a thousand baby seals. The build system is fast and easily understood, the typing makes refactoring so much easier, and in probably its biggest win, I can read a Javascript tutorial and trivially write the same thing in Typescript.

As a language, though, it still leaves a lot to be desired. Things like type guards and null annotations are like the methadone to the vastly more addictive pattern matching and options that I can no longer live without, and promises/callbacks are vastly inferior to futures. I would rather use Scala.js or Elm, but the ecosystems pale in comparison and trying to work in what is effectively an abstraction layer (and leaky at that) makes life really difficult. So I stick with Typescript.

Re: TypeScript Won

#7
post #4

What have they won? Why all of the f'ing if you choose A you're awesome if you choose B you've lost? Articles like this give me anxiety.

"Won" may be click-bait a little bit here, but I think the overall message is that if you are starting from scratch and deciding on which toolchain or approach to pick from, Typescript may be your best choice (but obviously not the only choice, since you may have specific requirements that affect this generic recommendation).

Re: TypeScript Won

#8
post #2

Does anyone here have bad things to say about TypeScript? I haven't used it for any large projects yet (couple toy ones) but seems pretty legit. Based on my anecdata, people who have used it at scale seems to like it. I can't tell if that's because they're still in the honeymoon phase or if it really is a step forward for the long term.

Top-level types can be permanently shadowed. For instance, if I name a type "Date" within a namespace, then every file within that namespace or a sub-namespace will no longer be able to access the JavaScript native Date type. This also apparently isn't something they're inclined to fix. [0]

The tsconfig.json file does not allow for glob-type inclusion of files, or even inclusion of directories. However, you can exclude entire directories. So if I want to simply compile everything in the "src" directory, my best option is to exclude every other directory.

[0] https://github.com/Microsoft/TypeScript/issues/983

Re: TypeScript Won

#10
post #4

What have they won? Why all of the f'ing if you choose A you're awesome if you choose B you've lost? Articles like this give me anxiety.

The article presents measurements indicating that Typescript has won greater mindshare compared to similar JavaScript transpilers.
Post reply on HN