首页> 外文会议>ACM SIGPLAN Conference on Programming Language Design and Implementation >The Implicit Calculus A New Foundation for Generic Programming
【24h】

The Implicit Calculus A New Foundation for Generic Programming

机译:隐含微积分是通用编程的新基础

获取原文

摘要

Generic programming (GP) is an increasingly important trend in programming languages. Well-known GP mechanisms, such as type classes and the C++0x concepts proposal, usually combine two features: 1) a special type of interfaces; and 2) implicit instantiation of implementations of those interfaces. Scala implicits are a GP language mechanism, inspired by type classes, that break with the tradition of coupling implicit instantiation with a special type of interface. Instead, implicits provide only implicit instantiation, which is generalized to work for any types. This turns out to be quite powerful and useful to address many limitations that show up in other GP mechanisms. This paper synthesizes the key ideas of implicits formally in a minimal and general core calculus called the implicit calculus (λ=>), and it shows how to build source languages supporting implicit instantiation on top of it. A novelty of the calculus is its support for partial resolution and higher-order rules (a feature that has been proposed before, but was never formalized or implemented). Ultimately, the implicit calculus provides a formal model of implicits, which can be used by language designers to study and inform implementations of similar mechanisms in their own languages.
机译:通用编程(GP)是编程语言的越来越重要的趋势。众所周知的GP机制,如类型类和C ++ 0x概念提议,通常组合两个特征:1)一种特殊类型的接口; 2)隐含这些接口的实施的实例化。 Scala含义是一种GP语言机制,受到类型类的启发,与特殊类型的接口耦合隐式实例化的传统中断。相反,含义仅提供隐式实例化,这是概括为任何类型的工作。这结果是非常强大,有用的是解决其他GP机制上的许多限制。本文在最小且一般的核心微积分中综合了含义的关键思想(λ=>),显示了如何构建支持隐式实例的源语言。微积分的新颖性是其对部分分辨率和高阶规则的支持(之前提出的一个特征,但未正式或实施)。最终,隐式微积分提供了一个正式的含义模型,可以由语言设计者使用,以便以自己的语言研究和告知实现类似机制的实现。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号