r/purescript • u/Tim_M • May 15 '16
Which FRP libraries would you recommend?
I'm looking to learn FRP, and was wondering what the ecosystem in Purescript for doing so was like. I've done some quick googling for potential candidates and appreciate if anyone could pitch in with anything they know about these, or any others I haven't mentioned:
9
Upvotes
View all comments
Show parent comment
4
u/ryantrinkle May 16 '16
I'm the author of Reflex, and for me, the choice of GHCJS came down to fact that it scrupulously implements even the very tricky parts of the runtime system. In particular, "weak references", i.e. references to a value that do not cause the garbage collector to retain that value, are not natively available in JS, so GHCJS implements them on top. Due to the push-driven nature of Reflex's Events, which is critical for performance, it needs weak references to avoid creating memory leaks.
I'd also like to point out that Reflex is not designed only for GHCJS - it also fully supports regular GHC. However, of the javascript cross-compilers I'm aware of, only GHCJS supports the features Reflex needs.