Email or username:

Password:

Forgot your password?
Nikita

I have been noticing a weird thing when I hear some people talk about #TypeScript in relation to #JavaScript. But, before I elaborate, a poll!

How different from each other do you see JavaScript and TypeScript?

As in, how close or far apart do you see their Venn circles?

Anonymous poll

Poll

TS is sugar for JS; basically the same language
39
67.2%
TS is related to JS, but not JS
13
22.4%
TS is completely different from JS
3
5.2%
Um, akshually... (anything else; pls comment)
3
5.2%
58 people voted.
Voting ended 2 September at 6:26.
11 comments
Nikita

Note that this is not a "serious" and "scientific" question. There is no right answer. Answer with your gut :)

stay hinged

@kytta

way to dismiss nuanced takes by pre-branding them with the "akshually" guy. don't do that

Nikita

@unspeaker sorry, didn't mean to offend anyone with this. I just wanted to avoid replies like "TS is a transpiler, not a language", and I put a meme there without thinking 😞

Nikita

@unspeaker and I don't want to dismiss the takes about the language, for that matter, just the smaller nitpicks that don't contribute to the conversation. You other reply definitely did, and it quite accurately reflects my PoV!

stay hinged

@kytta

no biggie 🙂

now you've got me wondering what's with that "TS is a transpiler, not a language" take though! 🤔

Callionica

@kytta For me, It’s all of the answers at the same time, so I hit “akshually”

stay hinged

@kytta

ts is an example of "embrace, extend, extinguish" for a generation of developers who do not remember "the halloween papers" and have drunk the "microsoft loves open source" kool-aid hook, line, and sinker

it's an example of how one of the most toxic vendors interposes themselves as a gatekeeper, under the guise of an open source license, in response to a legitimate need for a better js

Григорий Клюшников

It's JS with sensible inheritance but way too much this

Krazov

@kytta, TypeScript is a very elaborate linter for JavaScript. Despite its appearances, it's not adding anything of substance, only a large exoskeleton that gives more power in some cases but is a drag in others.

Teodor Sandu

@kytta from a language theory perspective, TS is a superset of JS, so its Venn diagram would be a larger circle around JS.
So all JS is TS but TS comes with extra type annotations, interfaces, etc. which act like a foundation for much better intellisense and overall tooling.
At runtime of course TS is transpiled down to JS so there's *little* difference between the 2.
For me, TS is a useless headache, but I see how it can make code a bit easier to reason about in large teams and projects. Meh :)

Three

@kytta My understanding might be incorrect but as I understand it a well-typed TS program can *almost* be directly syntactically lowered to an equivalent JS program. "Almost" because I believe there's some extra sugar for some ergonomics things that do leverage the type information, but I don't know the specifics since I don't do TS progamming actively.

Go Up