Are there any libraries written for Scala enabling Functional Reactive Programming?
See also Odersky et al.'s paper "Deprecating the Observer Pattern". It explains the library Scala.React, which was developed for the paper.
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.
Signal
is an applicative. And I didn't use any sort of bridge; I just mixed reactive code in with Swing code -- a little messy since the swing components are so stateful, but usable. The whole thing will be on github eventually. –
Leannleanna pure
is a constant signal, and ap
is doing a zip
followed by a map
. So if say I have a signal x
and a signal y
and I want a signal x + y
, x zip y map { case (x, y) => x+y }
is like scalaz (x |@| y)(_ + _)
. –
Leannleanna https://github.com/Netflix/RxJava Functional Reactive Programming library for the JVM, developed by Netflix.
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.
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.
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.
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.
You have many many libraries. Here you have a list of many of them https://github.com/politrons/reactiveScala
© 2022 - 2024 — McMap. All rights reserved.