arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2008.12592cs.PL
收藏

在函数式响应式编程和Actors之间平滑导航

Smoothly Navigating between Functional Reactive Programming and Actors

N. Webster, M. Servetto

摘要:

我们正式定义了一个优雅的多范式统一的功能反应式编程,演员系统,面向对象编程。这就实现了一种直观的声明式编程,在保持安全性的同时获得了并发性的强大功能。我们使用对象和引用功能来突出和驯服命令式功能:引用功能跟踪别名和可变性,对象功能跟踪I/O。形式上,我们的类型系统限制了不纯代码的范围、影响和交互。- 作用域:输入为纯的表达式将表现出确定性。- 影响:避免了数据竞争和同步问题。参与者非确定性行为的唯一方法是根据消息传递顺序改变其状态。- 相互作用:信号提供了命令式代码和函数式代码之间的功能边界,防止不纯代码使函数假设无效。

英文摘要:

We formally define an elegant multi-paradigm unification of Functional Reactive Programming, Actor Systems, and Object-Oriented Programming. This enables an intuitive form of declarative programming, harvesting the power of concurrency while maintaining safety. We use object and reference capabilities to highlight and tame imperative features: reference capabilities track aliasing and mutability, and object capabilities track I/O. Formally, our type system limits the scope, impact and interactions of impure code. - Scope: Expressions whose input is pure will behave deterministically. - Impact: Data-races and synchronisation issues are avoided. The only way for an actor to behave nondeterministically, is by mutating its state based on message delivery order. - Interactions: Signals provide a functional boundary between imperative and functional code, preventing impure code from invalidating functional assumptions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑