Why I'll always use Typescript over Javascript

preview_player
Показать описание

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

Sorry for sounding so angry in this video, it gave me flashbacks of all the JavaScript bugs I’ve fixed over the years where I pass the wrong data into a function.

WebDevCody
Автор

I forgot that Javascript even exists😀😀. The first few months of learning was painful but now its a god send.

eshw
Автор

As someone who’s been getting into TypeScript over the last month, and who therefore had been seeking out content speaking to the true value of TS, let me tell you: this is the best video (or resource across all types and formats) that I’ve come across on the subject.

This video gets right to the heart of why TS is invaluable, which is one hell of a feat.

I had accepted that the esoteric-esque confusion I felt was simply because it would be impossible to appreciate the full value before I’d paid the price of entry—by getting through the gruelling learning process—but you’ve proven that wrong.

Thank you Cody, I’ve seen the light; I’m going to spend my morning tomorrow to deep diving into TS and start committing to it properly henceforth.

Praise TS, praise Cody 🙏😤

charliecoppinger
Автор

your folder structure's beautiful, Great video!

MrOrganicz
Автор

I saw how DHH dropped TS from Turbo like 5 mins ago and now I saw your vid 💀

madeinhvn
Автор

5:50 - "I think they're smoking something strong" -> I never expected you to say this like it was nothing. Laughed a lot 😝

Guergeiro
Автор

Great video!

Just an FYI, the PHP ecosystem has come a long way and now basically every serious project uses strict typing for the same benefits you listed! I know it's not the best programming language but it's definitely not the worst 😂

andrea.martella
Автор

Hi. I'm code as a hobby. Over 1 year I used java, now I jumped into javascript. Language is amazing, but I can just imagine how stupid must be debugging in large application when something went wrong.
I decided to use typescript. As I don't know javascript in overall I am overhelmed but the whole beauty is when i hover over a class or junction, I just know everything. Also, nice is that I can ctrl + click to jump in to the source code.

dominiktworek
Автор

Amen to this, completely agree as an application developer.

I would argue that it's not as simple though for library developers as the types can get pretty gnarly in lib code.

But as a consumer of a lib I want it to be typed as it's a real pain without them .

gavinlindridge
Автор

Heyyy!! Amazing video, and this perfectly explains why I'm frustrated with javascript now that I've worked with typescript. Anyways, regarding the slow speed, we can now use Bun, now that it was released!!! I haven't personally tried it out yet, but from the benchmarks, it appears to way faster than node, ts-node.

CrankyBarbaran
Автор

Man I'm yet to do any tests but 5:55 was hilarious 😂

MaxProgramming
Автор

Good job babe!!!! I got the notification late 😅😅

SeibertSwirl
Автор

After finishing a large project with TypeScript, I realized that I no longer need TypeScript. Since I understand my code very well, I can work with what some might consider "crappy" because they cant understand.

i just hate code gymnastics. i just right any for the library im trying to make.

jomoc
Автор

This video really resonated with me. I’m a C# dev who frequently has to sprinkle JS into our web apps. JS always feels unstructured and the code feels brittle.

_rcs
Автор

I prefer using TypeScript because it has the blue color

DeaViNG
Автор

Hopefully bun will help with the slowdown that you mentioned in the end.

maddada
Автор

I came from Java as well and I agree with your take. The only thing I’d say is that typescript does have a lot of “type gymnastics” and this is especially true when working with different packages as in some cases you’ll have to tell ts using “as” that they’re wrong and to Shutup just to get rid of an error. Still will never willingly go back to js tho

Tyheir
Автор

"I think they're smoking something strong" got me rolling on the floor🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣

sixtusonyedibe
Автор

I use TypeScript daily and have a C# background. Where I struggle is around figuring out the correct type to use in complex scenarios and situations where you have to perform type gymnastics when using other libraries. I also found it difficult to dive into libraries and inspect the types as sometimes you get types made up of several other nested types. Also, the IDE integration is a lot more buggy than I’m used to with VS and c#

danieljayne
Автор

Whether using TS or JS there are good practices that solve a lot of these problems:
For example turning your parameters into destructured objects. ie: export function convertToGrayScale({name, age}). You should also be using comments whether using TS or not, which is where JSDoc can be useful. If a codebase grows to any thing more than a solo project having just a type definition does not do enough to onboard a new developer on the way to use existing functions etc. As for "time saved" there can be some gains but as you mentioned there is a trade off. TS sometimes makes you do things twice, once defining the type and then writing the actual function that satisfies(heh) that type.

tratoc