Web时代:类型化函数优先编程再探
In the Age of Web: Typed Functional-First Programming Revisited
摘要:
大多数程序设计语言都是在网络时代之前设计的。这很重要,因为web改变了许多类型函数式语言设计者认为理所当然的假设。例如,程序不能在封闭的世界中运行,而是必须与(不断变化且可能不可靠的)服务和数据源交互,通信通常是异步的或事件驱动的,程序需要与非类型化环境进行互操作。在本文中,我们介绍了F#语言和库如何面对Web带来的挑战。从技术上讲,这包括使用类型提供程序来与外部信息源集成以及与非类型化编程环境集成,使用轻量级元编程来针对JavaScript和计算表达式来编写异步代码。在这个调查中,整体的观点比孤立的每个特征更重要。我们使用一个实际的案例研究作为起点,看看F#语言和库如何应对Web带来的挑战。具体的经验教训可能不如我们试图揭示在网络时代不再成立的隐藏假设那么有趣。
英文摘要:
Most programming languages were designed before the age of web. This matters because the web changes many assumptions that typed functional language designers take for granted. For example, programs do not run in a closed world, but must instead interact with (changing and likely unreliable) services and data sources, communication is often asynchronous or event-driven, and programs need to interoperate with untyped environments. In this paper, we present how the F# language and libraries face the challenges posed by the web. Technically, this comprises using type providers for integration with external information sources and for integration with untyped programming environments, using lightweight meta-programming for targeting JavaScript and computation expressions for writing asynchronous code. In this inquiry, the holistic perspective is more important than each of the features in isolation. We use a practical case study as a starting point and look at how F# language and libraries approach the challenges posed by the web. The specific lessons learned are perhaps less interesting than our attempt to uncover hidden assumptions that no longer hold in the age of web.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。