TypeScript

Hello to my wide audience which is composed entirely of whomever grades this. Today I will be talking about a great programming language called TypeScript. This language has been in my mind recently because I have been working with complicated data models that require good object oriented programming. TypeScript is a super script of JavaScript, so it feels familiar but it has more functionality. Some of the information I am sharing today can be found in this article.

Limitations of JavaScript and OOP

The lack of good object oriented programming makes JavaScript difficult to use for larger, more complicated applications. One thing that is particularly troublesome is trying to copy objects. JavaScript does not do deep copying of objects. However, there are some packages, like lodash, that provide the functionality. Classes also do not provide all the features that object oriented programming languages do, and their use is not recommended by many.

Benefits of TypeScript

As previously stated, TypeScript is a superscript of JavaScript. This means that you can convert JavaScript code to TypeScript fairly easily. Another benefit is that it is strongly typed, which is important for object oriented programming. I am currently on my second MECOP internship, and the importance of object oriented programming has been revealed to me. I have been working on a fairly complex algorithm that deals with multiple data sources. My original execution did not adhere to existing design patters well, so my code became unwieldy. I refactored the code to use good object oriented programming, and now the development process is much easier. I personally think that TypeScript is easy to learn if you have used JavaScript before, so it is a good tool to have for any web developer.

Leave a comment

Your email address will not be published. Required fields are marked *