DEV Community

Discussion on: Is TypeScript Really... A Language??

Collapse
 
isaachagoel profile image
Isaac Hagoel

I am surprised that no one mentioned C++ that started off as a superset of C ("C with classes").
I think both typescript and C++ had the same motivation for taking that approach - luring in the existing user base and lowering the transition cost/ risk. Needless to say, it was successful in both cases.
I see why you doubt how much of an actual language it is. It feels very wonky at times and adds very little besides types. It is not at the same league as C# or Java (because the types are shoehorned in rather than being part of the foundation that everything else is built around). That's the price of backwards compatibility with Javascript I guess.
Making a static language dynamic is a much easier task than the other way around. For example Groovy and Clojure are dynamic languages for the JVM that have good interoperability with Java. They just use Object as the type for everything under the hood afaik)

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

Good points. The more I think about it, there's no shortage of "Superset Of-" languages. That is, after all, part of the evolution of programming.

And I suppose I am more-than-a-little hung up on what TS seems to be bringing to the table. It's typing - and... that's about it. And, AFAIK, there's no way to just run TS. By itself. For the time being, at least, it actually requires you to have a JS runtime for it to work. That feels to me like... a package.

I'm realizing that one of my personal definitions for a standalone language is that it can run... standalone. Or at least, it should be "standalone" to the casual observer. I understand that one language may be completely dependent upon another - but if I have to manually supply the runtime for the 1st language, then it doesn't feel to me like the 2nd language is really much of a "language" at all.