JavaScript vs TypeScript: Do you really need types?
TypeScript seems to be the brand new hot replacement for JavaScript. Is it really what you think it is?
What is TypeScript?
TypeScript is what it sounds like. A version of JavaScript that involves types, supposedly more modern than the web development language we all know and love.
A lot of developers have switched over to TypeScript recently, thinking it was gonna be the next super cool boom meta programming language. This may have been right, or it may have been wrong.
TypeScript also changes JavaScript (I will refer to TypeScript and JavaScript as TS and JS from now on), meaning that a simple program in JS might not work in TS.
Okay, let’s take a look at both of these languages!
JS
JS is a language I have mentioned a lot on this blog, but it’s just a web development language basically. It’s really versatile, and I’m a big fan of it.
Things it has over TS
More popular; more people will know how to write JS than TS
Slightly easier, more straightforward
High job market
Things TS has over JS
Basically just Types; enum like things that are a core part of TS (these are more useful than you think!)
TS
TypeScript was released by Microsoft in 2012, as a “strict syntactical superset of JavaScript”. It was meant to, as I said earlier, be a kind of replacement or better version of JavaScript, that Microsoft hoped would storm the world.
Things TS has over JS
Types; enum possibilitiess, etc
The backing of a large company (Microsoft)
Things JS has over TS
More popular than TS as stated earlier
TS has harder syntax, for JS developers they might have trouble switching over
Higher job market
Conclusion
TS isn’t the thing everyone says it is. If you’re new to the scene, definitely go to TS. On the other hand, if you have experience with JS and have no massive reason to switch over, just don’t! It doesn’t have much over JS, for now.
Did you enjoy this? Follow me or clap for this post! I appreciate it, my stats say I have 5 fans who come back to this channel, but I only have 2 followers!