DEV Community

Discussion on: TypeScript is a waste of time. Change my mind.

swiftninjapro profile image

Personally, I think javascript is supposed to be a dynamic language, and typescript removes the dynamic type usage of javascript. I tried typescript at one point, and found setting the proper type difficult at times, and in some cases, impossible to do things a specific way. For making things easy to understand, just use common english words, or name parameters by type, ex: (str, obj, num, arr, bool, ect.)

JavaScript also hast "typeof" option you can use any time you may need a specific type. Also, for security, you can use typeof to verify user inputs, while typescript (which compiles to javascript), may cause a false sense of security.

JavaScript is a considered a weird language, because it isn't like other languages. I have aspergers syndrome (high functioning autism), so I might be considered weird because I don't socialize the same way as most people. Some people have noticed an advantage of aspergers syndrome in coding, because you don't follow typical standards strictly. I think creativity is important in coding. The standards might say, you should do it this way, but that doesn't mean there always right. You don't always have to copy the rest of the world, to inventive something new. If your coding, and your not creating something new, than I can see standards being helpful for building improved performance, if you were just trying to reinvent the wheel with better grip. what if the standards long ago said, every invention should be square. Then what if the inventor of the wheel followed that standard. Sometimes standards can help, but sometimes you may have to ignore a few of them for your project to work properly.

If that last paragraph makes no sense, read its second sentence. aspergers includes a tendency to change the topic a lot. I did that by accident.