Functional Reactive Programming in Scala [closed]

2020-01-29 03:09发布

问题:

Are there any libraries written for Scala enabling Functional Reactive Programming?

回答1:

See also Odersky et al.'s paper "Deprecating the Observer Pattern". It explains the library Scala.React, which was developed for the paper.



回答2:

There's reactive -- http://github.com/nafg/reactive. The repository currently contains two projects. reactive-core is a standalone FRP library. reactive-web builds on it to make it very easy to make very dynamic and interactive Lift webapps.



回答3:

https://github.com/Netflix/RxJava Functional Reactive Programming library for the JVM, developed by Netflix.



回答4:

There is Scala.Rx by Li Haoyi. In short, it aims to be a simpler, easy-to-use and more interoperable reimagination of (parts of) Scala.React.

Don't be misled by the Rx suffix. Scala.Rx has little to do with Reactive Extensions from .NET. Scala.Rx does not focus so much on asynchrony and event streams as rather time-varying values and the expression of functional dependencies with automatic change propagation.



回答5:

I don't Scala so don't know how good these are but here is a blog with comments that talk about FRP in scala: Functional Reactive Programming (FRP) in Scala (Fresca, ScalaFX) and here is the reddit that shows a stackoverflow conversation that led me to the above link.

I'd have a few questions about the FRP capabilities in Scala. What is
the current status of ScalaFX? isn't updated since 3 months... Is it currently usable?

It is definitely usable, there is just not an official release yet.

Are there any other FRP frameworks coming up (e.g. Fresca reborn)?

Fresca was my very first attempt at FRP in Scala. SFX as it is currently in trunk improves on Fresca in several aspects and as such can be seen as a successor to Fresca.



回答6:

Coursera Principles of Reactive Programming course promotes RxScala.

RxScala brings Reactive Extensions to Scala. Rx was first implemented for .NET, and is now being implemented in Java. The RxScala project is an adaptor for RxJava. Its code is in a subdirectory the RxJava repository.

This library is not yet finished. You have to expect breaking changes in future versions.



回答7:

There is scala-reactive: http://github.com/erikrozendaal/scala-reactive

It is inspired by Microsoft's Reactive Extensions library, with an Observable trait taking the place of IObservable, and tailored to the Scala collections API as much Rx is to the LINQ API.



回答8:

You have many many libraries. Here you have a list of many of them https://github.com/politrons/reactiveScala