purescript / purescript

A strongly-typed language that compiles to JavaScript
https://www.purescript.org
Other
8.54k stars 564 forks source link

FRP library #1217

Closed user471 closed 9 years ago

user471 commented 9 years ago

Why ps doesn't have standard frp library? There is https://github.com/bodil/purescript-signal/ but it's just elm port with " it tries to maintain API equivalence with Elm". There is also halogen and thermite with similar approach. What is the current ideology to deal with events? Why not just move something like https://github.com/slamdata/purescript-halogen/blob/master/src/Halogen/Signal.purs to separate library and use it as default way to UI interaction? And everyone can use it in there libraries and also not only with html.

paf31 commented 9 years ago

Halogen isn't an FRP library, even though it looks a lot like one. It's based on state machines.

Why ps doesn't have standard frp library?

It depends what you mean by standard. purescript-signal is a great library, and is as close to standard as you're going to get. There's also rabbit-frp, behaviors, rx, kefir, etc. etc.

I don't know why having a standard library is a good thing. We have plenty of options :smile:

user471 commented 9 years ago

I don't know why having a standard library is a good thing.

The main reason is it will work with current version of language and it won't be abandoned. purescript-signal - dom dependency, doesn't work with 0.7 and have weird idea to support equivalence with Elm rx - dom and jquery dependency rabbit-frp - dom dependency behaviors - not work with 0.7, seems abandoned kefir - dome dependency, not work with 0.7, seems abandoned

I would prefer to use something from std library

paf31 commented 9 years ago

The main reason is it will work with current version of language and it won't be abandoned.

I'm not really interested in adding an FRP library to the core library set (core already has a huge set of code to maintain, I don't want to add to that burden), but it would be a good candidate for purescript-contrib. If you're interested, why not start a project that meets your criteria, and we could move it to contrib when it becomes useful to others.

behaviors - not work with 0.7, seems abandoned

Definitely not abandoned, I hope to update it soon.