反应式和功能反应式编程之间的区别 [英] The difference between Reactive and Functional-Reactive programming

查看:210
本文介绍了反应式和功能反应式编程之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在研究反应式编程,我发现很难找到Reactive和 Functional -Reactive之间区别的很好描述。

简单地说,反应式编程是使用函数方法/范式实现的,而不是使用声明式或OO范式?

解决方案

功能反应规划(FRP)是一种具有特定语义的特定编程模型。
(实际上,有两种变体,有时称为经典FRP和箭头FRP。)
我在正如我在那里所说的那样,对我来说这两个关键属性一直是(a)精确&简单的外延和(b)连续的时间。
我很遗憾这种模式被称为功能性反应式编程,原因如下:



有关描述性和放大功能,准确性,我更喜欢术语外延连续时间编程(Jake McArthur在谈话中提出的建议),而不是功能性反应性编程。 非常短篇幅的博客文章FRP的起源 功能性反应式编程中的早期灵感和新方向


I have been doing some research into reactive programming recently and I'm finding it hard to find a good description of the difference between Reactive and Functional-Reactive.

Is it simply that the reactive programming is implemented using functional methods/paradigms as opposed to using declarative or OO paradigms?

解决方案

Functional Reactive Programming (FRP) is a specific programming model with a specific semantics. (Actually, there are two variants, which are sometimes called "classic FRP" and "arrow FRP".) I've given a summary in an answer to "What is (functional) reactive programming?". As I said there, the two key properties for me have always been (a) precise & simple denotation and (b) continuous time. I regret that this model came to be called "functional reactive programming", for a few reasons:

  • That name omits "time", and time is central for me.
  • The term "functional" has so little specific/clear meaning. I much prefer Peter Landin's suggested replacement "denotative". (See the quotes and reference in this blog comment.)
  • It's easy for people to incorrectly think they know what the term means because they know meanings (more or less) of each of the three words.

For descriptiveness & accuracy, I prefer the term "denotative continuous-time programming" (suggested by Jake McArthur in a conversation a while back) over "functional reactive programming".

I wrote a very short piece on the origin of FRP in the blog post Early inspirations and new directions in functional reactive programming.

这篇关于反应式和功能反应式编程之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆