New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please I implore you to bring back the R in FRP! (reactive objects) #843

Closed
razcore-art opened this Issue Mar 7, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@razcore-art

razcore-art commented Mar 7, 2017

Hello community. So a 5 sec backstory: I discovered Elm a week ago more or less after playing with reactiveX.

I understand that before Elm 0.17.1 there was a lot of confusion with streams and they were taken out. I think the new loop mechanism is actually pretty good and simpler, but on the other hand I think streams (reactive objects) are invaluable for UI development especially (which Elm is targeting), but more generically for everything.

I think that the update mechanism prior to 0.17.1 using streams was very limited and the streams were used in their most basic form (only filter/map/merge/and this weird foldp). But streams are much more than this.

Let me ask you a question: how would you implement gesture recognition in Elm? Let's start with something super simple like a double tap (on touch devices). Funny enough I started working on this in Elm and then I realized that there was no R in FRP :(. You'd probably end up doing something fancy with some state (model) and tie it together with some Time types/functions etc. Well please check this reactiveX example first to understand how easy this is with reactive objects: http://jsfiddle.net/staltz/4gGgs/27/. Now go and try to implement something like this in Elm.

OK so I want to make one thing clear. I think that the current update loop architecture is very well done for its purpose. I'm just saying that reactive streams/objects can complement it very nicely.

Taking the reactiveX example say you have an object in Elm that can behave like exactly like that along side the core loop and then in the subscription part you return a Msg which is then fed to update. This wouldn't break anything in Elm it would just make it awesome!

Let's make Elm great again? :P

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Mar 7, 2017

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Mar 7, 2017

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@popara

This comment has been minimized.

Show comment
Hide comment
@popara

popara Mar 8, 2017

http://elm-lang.org/blog/farewell-to-frp

You are jumping the ball on this one. Your best intentions would rumble many hours of good people's work.

popara commented Mar 8, 2017

http://elm-lang.org/blog/farewell-to-frp

You are jumping the ball on this one. Your best intentions would rumble many hours of good people's work.

@avh4

This comment has been minimized.

Show comment
Hide comment
@avh4

avh4 Mar 8, 2017

Member

Please see https://github.com/process-bot/contribution-checklist/blob/master/issues.md#issues

This discussion is more suited to one of the community forums http://elm-lang.org/community

Member

avh4 commented Mar 8, 2017

Please see https://github.com/process-bot/contribution-checklist/blob/master/issues.md#issues

This discussion is more suited to one of the community forums http://elm-lang.org/community

@avh4 avh4 closed this Mar 8, 2017

@elm elm locked and limited conversation to collaborators Mar 8, 2017

@elm elm unlocked this conversation Mar 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment