TypeScript vs JavaScript

preview_player
Показать описание
Become a TypeScript Wizard with my free beginners TypeScript Course:

Follow Matt on Twitter

Join the Discord:

Рекомендации по теме
Комментарии
Автор

How I answer questions when I'm pretending to get interviewed while in the shower

nixon
Автор

I remember 10 years ago, how we created "classes" in JavaScript :D

It looked so weird, something like:

var Loop = function()
{
this.Update = function(){ console.log("something") }
}

It was doing its job :D

orcdev
Автор

Hahah, cheeky! I agree, and i am only 10months into my frontend development journey. I love learning and using typescript and i know learning it is a positive.

KristianTheDesigner
Автор

Before using TypeScript I hadn't wanted to even touch it. After using it for a while I feel terrible using plain JS😅

lechos
Автор

Interesting so Microsoft almost reinvented GWT for C#

griffadev
Автор

I'm glad Microsoft didn't insist on continuing with this mishmash of C# and JavaScript. Forcing devs to learn C# just to write type-safe JS would be like Oracle forcing devs to learn Java to write JS, it wouldn't have attracted people to learn it the way TS does today.

BeeBeeEight
Автор

What is JSDoc? I have neither used JavaScript nor TypeScript.

cbbcbb
Автор

I used ScriptSharp. It was pretty horrible because how limited subset of C# could actually be used. Liked the idea though.

But typescript and also Blazor are so much better solutions than ScriptSharp ever was.

JohanNordberg
Автор

Ahhh so in a nutshell making js even better to work with :>

OmerMD
Автор

I agree that it is the tooling.
This is precisely why the language used does not have to be TS.
TS's tooling can be used with JS when using JSDoc. At that point, it is mostly just syntax, whereas TS looks a bit nicer, but JS does not need to be compiled which is a huge experience boost. (It is also unnecessary from the typing standpoint as long as the tooling is used, but an equivalent checking can still be executed in CI)

In the past TS had a huge advantage because it had proper classes, while JS had... let's just not speak about that abomination, but that is a thing of the past.

The only real argument for TS is something that I've actually never heard from anyone, but I experienced it myself. When for any reason you have to support old browser or node versions, TS can be compiled to be compatible with the provided ES standards, but that is relatively rare, and if you also need to use modules, then it will be hell regardless, but TS will allow the ES standard update to be smooth at least up to the newest available at the time of creating the project.

So overall I think TS as a language was great for a while, and today it's time to go back to JS with JSDoc with TS as a tooling, which is allowing JS to be just as great while also being more convenient as it is one less abstraction, which is always better (unless it brings enough gain, which it does not anymore)

heck-r
Автор

It's understandable that typescript was born out of people that didn't know js that well.

CristianKirk
Автор

Not agree with productivity. When you listen such type of guys. Remember which interests he promotes...

Max-nrbv
Автор

type safety is gay .. if you’re a good developer you can right great code without type safety

deestort
join shbcf.ru