DEV Community

Discussion on: Pitch me on TypeScript

Collapse
 
milandry profile image
Michael Landry

Hello, I am here to bash TS, specifically a particular painpoint I have found that was not mentioned yet. I submit this to provide contrary evidence to its merits, not necessarily as a verdict; TS may or may not make sense for any particular project.

As is often the case with technologies with feature bloat, users will inevitably misuse features available to them. For TS, that would be the rather ambiguous nature of interfaces vs enums vs types vs classes.

I strongly recommend all engineers to avoid object oriented paradigms whenever possible and instead favor functional programming and composition. TS tries to open that door, but at the same time attempts to support OOP paradigms based on traditional languages. As such, we wind up with these not so clearly defined concepts, complimented with the usual conventions that follow them around (ISmurf, IServlet, IResponse...)

I just find that languages that offer this many features give rises to codebases swamped in an unhealthy blend of OOP code, OOP code with anti patterns, mixed with functional and compositional approaches along side it.

Collapse
 
codewander profile image
codewander

rescript = typescript - OO