News for hackers. Stuff that matters.
Re:Functional Programming – How and Why by consilient on Monday January 02, 2023 @11:31AM (#34219808)
> Side effects are inevitable so if you are going to have side effects in a monad, what's the point anyway, one way or another you have side effects.

Imagine a style of programming where everything is assumed to be asynchronous, all the way down to language primitives. Someone who only ever wrote AsyncScript would look at TypeScript, say "Requests are inevitable, you're always going to end up in async/await anyway, so what's the point?"

This is exactly the relationship between imperative and pure-functional programming: the point of having explicit effect monads (or some other tracking system) is that it makes it possible to write code that isn't in them.

Re:Functional Programming – How and Why by mckravchyk on Monday January 02, 2023 @11:50AM (#34220109)
I agree, I missed the point. Come to think of it, this is probably the biggest advantage of functional over OOP.