Joinads: A Retargetable Control-Flow Construct for Reactive, Parallel and Concurrent Programming
Joinads: A Retargetable Control-Flow Construct for Reactive, Parallel and Concurrent Programming
复制标题
Joinads:用于反应式、并行和并发编程的可重定向控制流结构
DOI:
--
复制
发表时间:
2011
期刊:
影响因子:
--
通讯作者:
Don Syme
中科院分区:
文献类型:
--
作者:
T. Petříček;Don Syme
Modern challenges led to a design of a wide range of programming models for reactive, parallel and concurrent programming, but these are often difficult to encode in general purpose languages. We present an abstract type of computations called joinads together with a syntactic language extension that aims to make it easier to use joinads in modern functional languages.
Our extension generalizes pattern matching to work on abstract computations. It keeps a familiar syntax and semantics of pattern matching making it easy to reason about code, even in a non-standard programming model. We demonstrate our extension using three important programming models - a reactive model based on events; a concurrent model based on join calculus and a parallel model using futures. All three models are implemented as libraries that benefit from our syntactic extension. This makes them easier to use and also opens space for exploring new useful programming models.