Adding Dynamic Types to C#

Adding Dynamic Types to C#
复制标题

向 C 添加动态类型

DOI:
10.1007/978-3-642-14107-2_5
复制
发表时间:
2010
期刊:
Proceedings of the 18th International Workshop on Software and Compilers for Embedded Systems
影响因子:
--
通讯作者:
Mads Torgersen
Mads Torgersen
中科院分区:
--
文献类型:
--
作者:
G. Bierman;E. Meijer;Mads Torgersen

文献摘要

被引文献

相似文献

使用静态类型的语言(例如C≠和Java)的开发人员越来越多地与API和对象模型进行互操作,以动态语言定义这种阻抗不匹配的代码本文我们描述了C≠4.0中的新功能,该功能通过延迟使用静态类型的程序片段检查程序片段来支持动态和静态键入代码的安全组合动态直到运行时。执行时,这些动态代码片段是类型检查的,并使用与静态类型的代码相同的规则进行了解决。保持传递。
Developers using statically typed languages such as C≠ and Java are increasingly having to interoperate with APIs and object models defined in dynamic languages. This impedance mismatch results in code that is difficult to understand, awkward to analyze, and expensive to maintain. In this paper we describe new features in C≠4.0 that support the safe combination of dynamically and statically typed code by deferring type checking of program fragments with static type dynamic until runtime.When executed, these dynamic code fragments are type-checked and resolved using the same rules as statically typed code. We formalize these features in a core fragment of C≠ and prove important safety properties. In particular, we show that subtyping remains transitive.