Skip to content

Instantly share code, notes, and snippets.

@amcdnl
Last active November 14, 2024 09:12
Show Gist options
  • Save amcdnl/b52e9dd11850eeb8de8f to your computer and use it in GitHub Desktop.
Save amcdnl/b52e9dd11850eeb8de8f to your computer and use it in GitHub Desktop.

Why I hate TypeScript

Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.

Not Standard

TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.

Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.

Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!

It should also be worth mentioning that this language has been around for a long time and only recently gotten popular because of Angular2.

Not Community Driven

There is no community really driving the language itself. From what I see, random new things end up there with little to no community feedback. I could be wrong here, but I just don't see it much.

Types in a non-typed language is hard

Its like trying to fit a square into a circle hole. A lot of the ES6/7 things I try to do don't work at all and will likely never work with the way some of the types work. I think it should be JS first and then types not the other way around.

It probably doesn't help that the main people that wrote this weren't big JavaScripters before they started but thats just my personal thought.

Babel is way better

Babel is the ****! The plugin architecture system is amazing idea! I love being able to get community driven plugins ( Even if they might not be standard thats the risk I accept and am ok with ). I can target multiple environments ( node 4,5 / browser ). Plus, they are implementing specs and even if they are stage-0 and change, they are atleast some spec and i can run that plugin until I can update too.

I've been watching some of the targeting issues and they are pretty far out, TS on Node seems like a great fit, why not get that going asap?!

Babel is just SOOO far ahead ... The fact that people are using Babel and TypeScript together is a huge flag that TS needs to up their game.

TypeScript Definitions

Um, why do I need to mock fake TSDs for things that aren't TypeScript!? Your creating more headache, work, etc. This should have been addressed in v0!

No idea what language features I can use

I hit this all the time, I had no idea what ES* features I could use and what I couldn't. I spoke about this on a issue and they said they are only doing stage-3 but they have other things that are stage-0?

They lie

I think I've heard about 100x you can use as much or as little of it you want. Ya, good luck. Having to put any everywhere is not my idea of that statement.

What about flow?

I do generally like the approach FlowType is taking.. they put JS first and then lay types on top. Also, I can use babel to compile it and its not as much of a plunge into a java/c# like language.

TS and Babel are doing similar type declaration syntax so its a safer bet that might be included in a upcoming spec and if it doesn't you can always use babel-remove-flow-types ;).

@milahu
Copy link

milahu commented Sep 2, 2023

I recently discovered that one could write js in a lispy way. Just use normal functions and call them ordinarily. [...] So why is nobody using it like that?

because javascript is not a functional language. javascript has no tail call recursion, so sooner or later you will hit the "maximum call stack size exceeded" error, and the function call overhead makes functional style slower and more memory-hungry than imperative style... but you can implement lazy functions and trampolines in javascript, and some functional languages are hosted on javascript, like clojurescript

@mjobuda
Copy link

mjobuda commented Sep 2, 2023 via email

@nabato
Copy link

nabato commented Sep 6, 2023

@mjobuda Don't listen to TS bigots. JS was planned as a Scheme in the browser. It was designed to be a modern functional language by its creator, but OOP fanboys disfigured it with Classes™ and Inheritance™.

@knightedcodemonkey
Copy link

Another popular web framework drops TS: hotwired/turbo#971

@jimmywarting
Copy link

All for it! 👍
but the way turbo went about it was a bit drastically. they could have done it more cleanly.

@tamtm
Copy link

tamtm commented Oct 22, 2023

@mjobuda Don't listen to TS bigots. JS was planned as a Scheme in the browser. It was designed to be a modern functional language by its creator, but OOP fanboys disfigured it with Classes™ and Inheritance™.

hell yeah, they can't handle javascript's prototype-based programming, so they have to add classes

@archcra
Copy link

archcra commented Oct 22, 2023 via email

@tamtm
Copy link

tamtm commented Oct 22, 2023

if you want to check types, just make a function to do it, there is no need for a whole language

@archcra
Copy link

archcra commented Dec 24, 2023 via email

@BeKnowDo
Copy link

Let’s be honest, TS advocates don’t really care about type safety. They just want their IDE to help them understand function signatures.

+1

@archcra
Copy link

archcra commented Apr 22, 2024 via email

@tetthys
Copy link

tetthys commented Jun 11, 2024

I like javascript not typescript.

@archcra
Copy link

archcra commented Jun 11, 2024 via email

@rhclayto
Copy link

It's built by Microsoft to fit the Microsoft way of development (big corporate teams). Good for them, & others like them. But then all the little open-source projects jump on the bandwagon, & then everything is in TypeScript, & the JS projects that are so useful to smaller developers wither away. So now we're all coding like corporate drones. It sucks.

@BeKnowDo
Copy link

BeKnowDo commented Oct 22, 2024 via email

@kevinlbatchelor
Copy link

I like that this conversation is still going after years, it speaks to, the fact that a vocal minority exists. However TS has won the day. I can, for the moment resist using TS, because I'm run my own teams. I believe the upside of using TS is outweighed by the downside, but most people are more concerned about their future job prospects and rightfully so. Lacking TS EXP will now affect your hireability, that is how software development demagogy works.

@desphilboy
Copy link

I like that this conversation is still going after years, it speaks to, the fact that a vocal minority exists. However TS has won the day. I can, for the moment resist using TS, because I'm run my own teams. I believe the upside of using TS is outweighed by the downside, but most people are more concerned about their future job prospects and rightfully so. Lacking TS EXP will now affect your hireability, that is how software development demagogy works.

It is winning because the world of development has been dominated by big techs more and more and they are enforcing it. As someone doing Typescript for 5 years definitely than lack of knowledge is not the motivation for me

@BeKnowDo
Copy link

I'll continue to say this. The only reason why TypeScript has grown in popularity is because a very big company pushed it onto everyone.
I'll take three senior javascript developers and match them up against any three TS developers and we'll not only get things done faster, it'll have just a few bugs. TS doesn't make you a better engineer or developer.

@nabato
Copy link

nabato commented Oct 24, 2024

I'll continue to say this. The only reason why TypeScript has grown in popularity is because a very big company pushed it onto everyone. I'll take three senior javascript developers and match them up against any three TS developers and we'll not only get things done faster, it'll have just a few bugs. TS doesn't make you a better engineer or developer.

Exactly this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment