DEV Community

Discussion on: Class Contradictions in TypeScript vs JavaScript

Collapse
 
gregfletcher profile image
Greg Fletcher • Edited

There are pros and cons to both OOP (classes) and FP.

I find Anders Hejlsberg's musings on functional and OOP very enlightening. He talks about how they moved the original TypeScript codebase which was very OOP heavy (lots of classes) and over to a functional programming style with immutable data structures etc. I like his approach. FP helped solve some of their problems they were tackling so they embraced FP and went with it. I'm sure the same approach would have been used if OOP was a better solution.

Worth a watch :)
youtube.com/watch?v=7YDVbkvVXQM