Journal entry for


I’d really like to find out how a library like Reflex works. I also just found out that browsers support weak references and finalizers in JavaScript now, so I think that means Reflex Spider-style implementations can now be done in JS.

IIRC something that’s expensive in Reflex is to know whether Event (Event a) has a simultaneous occurrence. Another expensive thing is joining Dynamic (because of the previous simultaneous nested event occurrence thing?). Why are they so in the current Reflex implementation?

Random thought: it would be cool if an implementation supported

occurs :: Event a -> Now (Maybe a)

A function like this might make writing code involving multiple events and behaviors much more ergonomic. Now you only have sample for behaviors, but not the equivalent for dynamics.