DEV Community


Discussion on: Class Contradictions in TypeScript vs JavaScript

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 :)

lifelongthinker profile image
Sebastian • Edited

Hejlsberg is always worth listening to. 👍

nickytonline profile image
Nick Taylor (he/him)

He's a pretty funny guy if you listen to some of his interviews. He always looks like he's having a good time.