News for hackers. Stuff that matters.
Re:Programming Languages Going Above and Beyond by nine_k on Thursday June 29, 2023 @04:16PM (#36526100)
Look, you have a large stream of pure functions that exchange immutable data. There is a place where you can thread in the effects, and it's not entirely like using >>=, but after it, it's immutable data and pure functions again.

It's very different from jQuery and the callback hell, or from any two-way bindings all the way to Visual Basic.

It teaches you to value immutability and purity, to crave it (then comes Ramda, etc).

Also, Promises are not entirely monadic, and `async` is not entirely the do-notation, but you can use a lot of monadic approaches, and reap some of the benefits.

Re:Programming Languages Going Above and Beyond by valenterry on Thursday June 29, 2023 @04:21PM (#36526157)
> and it's not entirely like using >>=

Exactly, and that's why it is not pf. It's really as simple as that.

It's also not as if it would be theoretical distinction that has no meaning for praxis. It does. For instance, since I cannot control the execution of React's cycle (including rendering) it becomes hard(er) to do certain kind of page animations that should happen between renders.

> It's very different from jQuery and the callback hell

Yes, it is nicer to use. But it is not pfp-style.

Re:Programming Languages Going Above and Beyond by nine_k on Thursday June 29, 2023 @05:13PM (#36526792)
What would you suggest as a pure enough example of FP GUI? Anything besides Elm, I mean? :)
Re:Programming Languages Going Above and Beyond by valenterry on Thursday June 29, 2023 @05:51PM (#36527260)
I have never worked with one professionally (I rarely do frontend work anyways) and for my own projects I used react, dirty and productive as it is. ;)