Remix.run Logo
lateforwork 2 hours ago

Encapsulation, inheritance and polymorphism all work fine with JavaScript classes. OOP works just fine.

What doesn't work in JavaScript is functional programming.

DauntingPear7 an hour ago | parent [-]

I don’t see how? You can do all sorts of FP in js and it even has some of it in its built in APIs. .then comes from FP

lateforwork an hour ago | parent | next [-]

You are right, there are some FP features in JavaScript. But the way it is used in the predominant UI framework (namely React) is definitely breaks FP, see https://mckoder.medium.com/why-react-is-not-functional-b1ed1...

nurple an hour ago | parent | prev [-]

Yes, but promises are (unfortunately) _not_ monads!

https://rybicki.io/blog/2023/12/23/promises-arent-monads.htm...