Scala 中的函数式响应式编程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1054179/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Functional Reactive Programming in Scala
提问by Daniel C. Sobral
Are there any libraries written for Scala enabling Functional Reactive Programming?
是否有为 Scala 编写的库支持函数式反应式编程?
回答by magicduncan
See also Odersky et al.'s paper "Deprecating the Observer Pattern". It explains the library Scala.React, which was developed for the paper.
另请参阅 Odersky 等人的论文“弃用观察者模式”。它解释了为论文开发的库Scala.React。
回答by nafg
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.
有反应 - http://github.com/nafg/reactive。存储库当前包含两个项目。react-core 是一个独立的 FRP 库。react-web 建立在它的基础上,使制作非常动态和交互式的 Lift webapps 变得非常容易。
回答by Mairbek Khadikov
https://github.com/Netflix/RxJavaFunctional Reactive Programming library for the JVM, developed by Netflix.
https://github.com/Netflix/RxJava用于 JVM 的函数式响应式编程库,由 Netflix 开发。
回答by Eugen
There is Scala.Rxby Li Haoyi. In short, it aims to be a simpler, easy-to-use and more interoperable reimagination of (parts of) Scala.React.
有Li Haoyi 的Scala.Rx。简而言之,它旨在成为 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.
不要被 Rx 后缀误导。Scala.Rx 与 .NET 的 Reactive Extensions 关系不大。Scala.Rx 不太关注异步和事件流,而是关注随时间变化的值和具有自动更改传播的函数依赖关系的表达。
回答by DouglasH
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 hereis the reddit that shows a stackoverflow conversation that led me to the above link.
我不会 Scala,所以不知道它们有多好,但这里有一个博客,其中有关于 Scala 中 FRP 的评论:Scala 中的功能反应式编程 (FRP)(Fresca,ScalaFX),这里是显示 stackoverflow 的 reddit引导我进入上述链接的对话。
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.
我对 Scala 中的 FRP 功能有一些疑问。什么是
当前状态ScalaFX?3 个月后没有更新......它目前可用吗?它绝对可用,只是还没有正式发布。
是否有其他 FRP 框架出现(例如 Fresca reborn)?
Fresca 是我在 Scala 中第一次尝试 FRP。目前在主干中的 SFX 在几个方面改进了 Fresca,因此可以看作是 Fresca 的继承者。
回答by Vadzim
Coursera Principles of Reactive Programmingcourse 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.
RxScala 为 Scala 带来了响应式扩展。Rx 最初是为 .NET 实现的,现在正在用 Java 实现。RxScala 项目是 RxJava 的适配器。它的代码位于 RxJava 存储库的子目录中。
这个库还没有完成。您必须期待未来版本中的重大更改。
回答by Allan Erskine
There is scala-reactive: http://github.com/erikrozendaal/scala-reactive
有 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.
它的灵感来自 Microsoft 的 Reactive Extensions 库,用 Observable 特性代替 IObservable,并针对 Scala 集合 API 量身定制,就像 Rx 对 LINQ API 一样。
回答by paul
You have many many libraries. Here you have a list of many of them https://github.com/politrons/reactiveScala
你有很多很多图书馆。在这里你有一个列表,其中有很多https://github.com/politrons/reactiveScala

