tag:blogger.com,1999:blog-1777990983847811806.post8221151036070232655..comments2024-03-16T16:29:29.582-07:00Comments on Haskell for all: The "return a command" trickGabriella Gonzalezhttp://www.blogger.com/profile/01917800488530923694noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1777990983847811806.post-80976278285647237042021-10-20T03:47:12.846-07:002021-10-20T03:47:12.846-07:00> Now we only need to make two changes to the c...> Now we only need to make two changes to the code any time we add a new command. <br /><br />IIRC, one of the motivations behind "hooks" in React was similar: to reduce the number of places in the code that should be modified when adding some new behavior.danidiazhttps://www.blogger.com/profile/00202497971909513168noreply@blogger.comtag:blogger.com,1999:blog-1777990983847811806.post-4329614417166999222021-10-07T17:37:04.993-07:002021-10-07T17:37:04.993-07:00Is this similar to Elm's commands that it send...Is this similar to Elm's commands that it sends to the update method?icosahedronhttps://www.blogger.com/profile/08683526186690777317noreply@blogger.comtag:blogger.com,1999:blog-1777990983847811806.post-35017834842526627782021-10-06T15:43:02.011-07:002021-10-06T15:43:02.011-07:00The trade-off here is that the parser's correc...The trade-off here is that the parser's correctness is now harder to test. That seems worth it in this case, since the parser has been tested to be rock-solid.<br /><br />Zach Tellman has an interesting talk[1] about some similar ideas around the spectrum from data to execution, although it's geared towards imperative programmers and so leans in the opposite direction.<br /><br />[1] https://www.youtube.com/watch?v=3oQTSP4FngYliftMhttps://www.blogger.com/profile/07500436345479523443noreply@blogger.com