One-shot Delimited Continuations with Effect Handlers

森建 moriken at kimamass.com
Tue Nov 6 10:27:11 UTC 2018


Sorry for my hasty reply, the restriction seems to be not related to Algebraic Effects. But I think that Algebraic Effects specifications is useful for a pure implementation.

On 2018/11/06 18:44, 森建 wrote:
> React Hooks, a new feature of React v16.7.0-alpha, is a hacky implementation, so there are restrictions that must be called in order.
> https://reactjs.org/docs/hooks-rules.html
> 
> One of React members says below:
> 
>  > Finally, if you’re a functional programming purist and feel uneasy about React relying on mutable state as an implementation detail, you might find it satisfactory that handling Hooks could be implemented in a pure way using algebraic effects (if JavaScript supported them). And of course React has always relied on mutable state internally — precisely so that you don’t have to.
> 
> https://medium.com/@dan_abramov/making-sense-of-react-hooks-fdbde8803889
> 
> IMHO, it's worth considering that we'll include Algebraic Effects specifications in ECMAScript.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list