While modern software development heavily uses versioned packages, programming languages rarely support the concept of versions in their semantics, which makes software updates more bulky and unsafe. This paper proposes a programming language that intrinsically supports versions. The main goals are to design core language features to support multiple versions in one program and establish a proper notion of type safety with those features. The proposed core calculus, called Lambda VL, has versioned values, each containing different values under different versions. We show the construction of the type system as an extension of coeffect calculus by mapping versions to computational resources. The type system guarantees the existence of a valid combination of versions for a program. The calculus enables programming languages to use multiple versions of a package within a program. It will serve as a basis for designing advanced language features like module systems and semantic versioning.
翻译:虽然现代软件开发大量使用版本的软件包,但编程语言很少支持其语义学中版本的概念,使软件更新更加大量和不安全。本文建议了一种本质上支持版本的编程语言。主要目标是设计核心语言功能,以支持一个程序中的多个版本,并用这些功能来建立适当的类型安全概念。提议的名为Lambda VL的核心微积分已经版本了数值,每个数值在不同版本中包含不同的值。我们用计算资源来显示类型系统的构建,通过绘图版本来扩展共效微积分。类型系统保证了程序版本的有效组合。计算使程序内多个版本的编程语言能够使用多个版本的软件包。它将作为设计高级语言特征的基础,如模块系统和语义版本。