News for hackers. Stuff that matters.
Re:Resolving the Time Paradox Implied by Functional Programs by usmannk on Monday December 28, 2020 @12:42AM (#25557010)
Consider pressing a "play" button to first start playing the video but then also remove itself from the UI and replace it with a "pause" button that when clicked does the inverse. The UI here is acting as a state store but the functions can then be designed as purely functional, acting only on their inputs.
Re:Resolving the Time Paradox Implied by Functional Programs by andrekandre on Monday December 28, 2020 @01:50AM (#25557298)
ah, that makes more sense i think... yes, i guess that is one way of accomplishing it, thanks ^^
Re:Resolving the Time Paradox Implied by Functional Programs by usmannk on Monday December 28, 2020 @02:03AM (#25557349)
I don’t recommend this strategy in practice though. It’s brittle and not all application state can even be represented as UI (what about your login cookie?).