Live data from Hacker News

Glimmer.js: What’s the Deal with TypeScript?

medium.com

1–10 of 112 posts

Re: Glimmer.js: What’s the Deal with TypeScript?

#2
I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript.

You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript. Then, you have three different languages that introduce similar functionality, that all transpile into JavaScript.

Sound familiar?

Re: Glimmer.js: What’s the Deal with TypeScript?

#3
post #2

I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript. You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript.…

JavaScript changes slowly, and adoption of its changes is even slower. TypeScript has the major benefit of working now.

Also, TS is a superset of JS, so the fact that it's a different language isn't really problematic.

Re: Glimmer.js: What’s the Deal with TypeScript?

#4
post #2

I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript. You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript.…

Angular 2 was written with TypeScript.

Re: Glimmer.js: What’s the Deal with TypeScript?

#5
post #2

I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript. You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript.…

> I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript.

There is a huge push going on. But Javascript has a consensus driven community: all the big players involved have to agree on something for it to be adopted (Google, Apple, Microsoft, Mozilla, etc.). Plus, even when it's adopted there's usually a 2-5 year delay before mass diffusion.

Re: Glimmer.js: What’s the Deal with TypeScript?

#6
What sold me on TypeScript was that it didn't just add features, it actively solved a problem I'd been experiencing.

Once a JavaScript project scales beyond what can fit in your head, JS's initial productivity boost crumbles because you have to constantly double back and make sure your methods/constructors/etc. are correctly used, which properties are optional, etc... A lot of the debugging happens in runtime and god help you if you try to make a breaking change to one of the major classes/apis in your project.

It's not unbearable, but the main reason for using JS is because of the productivity it allows.

With TS for the cost of taking the time to explicitly define your data you get a C#/Java level of debugging that has clear productivity gains and shifts your debugging from the browser/console to the IDE.

And when something doesn't fit the TS model you can just exclude it or only type the wrappers that integrate with the rest of your project.

That and async/await is a godsend over promises.

Re: Glimmer.js: What’s the Deal with TypeScript?

#7
post #2

I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript. You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript.…

[deleted]

Re: Glimmer.js: What’s the Deal with TypeScript?

#8
post #6

What sold me on TypeScript was that it didn't just add features, it actively solved a problem I'd been experiencing. Once a JavaScript project scales beyond what can fit in your head, JS's initial productivity boost crumbles because you have to constantly double back and make sure your methods/constructors/etc. are correctly used, which properties are optional, etc... A lot of the debugging happens in runtime and god…

Have you tried Elm? Id love to know your experiences.

Re: Glimmer.js: What’s the Deal with TypeScript?

#9
>At the end of the day, though, JavaScript is the language of the web.

And when webassembly arrives that will be over, and Typescript will be deprecated. I can't wait for a better modern language like Haskell, Python, Livescript, etc.. built on top of webassembly. Then we can finally stop trying to fix Javascript's flaws with new language features.

Post reply on HN