DEV Community

loading...

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

Collapse
lifelongthinker profile image
Sebastian • Edited

Hejlsberg is always worth listening to. 👍

Collapse
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.