DEV Community

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

Collapse
 
elmuerte profile image
Michiel Hendriks

HTML is a language, a markup language. But not a programming language. HTML does not result in an executable program. Of course you can make an interpreter for HTML which imposes a specific grammar so that it turns into a programming language, but that would not really be HTML anymore. It would be another esoteric programming language.

Declarative programming languages are commonly based on the declaration of facts, rather than describing a control flow. SQL or Prolog are examples of declarative programming languages.

JSX is JavaScript mixed with markup. Basically syntactic sugar for templating markup. It doesn't not really define a new language as it's basically JavaScript with the requirement of a specific pre-processor for processing the inline templates. So it does make JSX a programming language language, but that's because it's essentially JavaScript.

TypeScript on the other hand is a new programming language. Just because its primary output is a different programming language, for which it also offers interoperability makes no difference. I think you can compare TypeScript to JavaScript as you can compare C++ to C.

To continue on about JSX, TypeScript also has a "JSX" mode where the XML templating of JSX is supported in TypeScript, so basically TSX. Is TSX a new language? no, it's part of TypeScript.

Thread Thread
 
jwp profile image
John Peters

I try to stay away from minute definitions of a language, as I see no value in the discussion. If I need to read, write, speak or hear about something in order to understand and synthesize; then to me, I'm speaking a language.

Some cultures mix English with their native language. To us it a non-understandable mix of two, but to them it's a perfectly legitimate way to communicate.

Thread Thread
 
elmuerte profile image
Michiel Hendriks

I'm a programmer, an engineer. Being as much as correct, or maybe clear, as possible is in our nature. Making clear distinction in kind of languages is important. This isn't about making one kind of language inferior to the other. It's about setting boundaries in domains. Ambiguity is a huge problem. This is a primary reason why natural languages are extremely difficult to process. This is why TypeScript was made, weakly typed languages, like JavaScript, significant issues in correctness which strongly typed languages have not.

I live in a country where English, and other languages, are mixed with out native language. Especially for English we have grammatical rules how these borrow words are supposed to be transformed in various constructions. But mixing Dutch with English, German, and French has no absolutely no effect on the type of language which is applied. It is still the same kind of language, so called natural language. But even with language language, there is a special class dubbed legalese. It's a more formal application of natural language, but way less formal than languages commonly used by software.

Thread Thread
 
jwp profile image
John Peters • Edited

I don't disagree, but I do know that my knowledge of Programming languages has also taken on my own style in using them. It's similar to an accent in a spoken language. I don't feel that any one accent is better than any other; however; accent or not, if there's a violation in what is written or spoken; then that, and only that is of concern. It's exactly why I like Typescript because it makes me more cognizant of making things safer. The last thing I want to do (again) is to release a bug to production because of some really stupid accidental thing I did. I like Typescript coupled with Unit Tests because it builds confidence. I also love C# for Back-end work because it's safe.