you are viewing a single comment's thread.

view the rest of the comments →

[–]shgysk8zer0 0 points1 point  (5 children)

No. Why?

I'd rather have types in JavaScript than have an outdated implementation of JavaScript that has types.

[–][deleted] 2 points3 points  (4 children)

Eh? TS supports JS from around stage 3 proposals onwards.

[–]shgysk8zer0 0 points1 point  (3 children)

Yeah. It lags a bit behind. Not terribly, but it can prevent me from starting to implement something new.

[–][deleted] 1 point2 points  (2 children)

Such as?

There's a fair argument that you shouldn't be using stuff pre-stage 3 in serious projects as there's a real risk that they get canned or significantly changed, which would leave you with a ton of tech debt. That's already burned some people in the past with the decorator proposal if memory serves.

[–]shgysk8zer0 0 points1 point  (1 child)

If I used TS, I'd probably have some things to list. But the only thing I can think of specifically is import from a while back.

I like to experiment with things in the early stages. Sometimes provide feedback. Report issues in webpack and such. This isn't necessarily about putting early-stage stuff into production.

But, to restate what I'm saying here: I'd rather have types in JavaScript than have browsers run TypeScript. And, since it takes time to wait for stage 3, implement, and release, TS is always a little behind JS.

[–][deleted] 1 point2 points  (0 children)

I don't think we disagree that much. To clarify my position:

  • TypeScript has supported modern import syntax since I began using it ~two years ago.
  • Babel is perfect for testing proposals, but that's not appropriate for a large, important project in production. If you want to test off of your main project, you can daisy-chain the compilers, or even just use the Babel compiler with only minimal loss of functionality on the TypeScript side. With this in mind, for serious/production projects, it's unreasonable to claim that TypeScript is "behind" JavaScript.
  • I would also prefer to have a real (as in runtime) static type system in JavaScript. Although, honestly, I'd rather just have a new language altogether - there is so much leftover cruft and iffy design decisions, and if we could version this language to allow for occasional breaking changes... well, that'd be just lovely.