计算机科学 > 程序设计语言
[提交于 2023年7月13日]
标题:Typed Design Patterns for the Functional Era
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:This paper explores how design patterns could be revisited in the era of mainstream functional programming languages. I discuss the kinds of knowledge that ought to be represented as functional design patterns: architectural concepts that are relatively self-contained, but whose entirety cannot be represented as a language-level abstraction. I present four concrete examples embodying this idea: the Witness, the State Machine, the Parallel Lists, and the Registry. Each pattern is implemented in Rust to demonstrate how careful use of a sophisticated type system can better model each domain construct and thereby catch user mistakes at compile-time.
提交历史
来自:Will Crichton[v1] 2023年7月13日 星期四 21:23:31 UTC