期刊文献+

使用C#7元组语言特性优化数据驱动软件研究 被引量:1

Using C# Tuple to Optimize Data-driven Software Development
下载PDF
导出
摘要 C#作为一种现代编程语言,广泛应用于通用业务系统开发。由于早期的C#语法限制,在数据密集型领域使用MatLab、Python、IDL(Interactive Data Language)等动态脚本语言更为合适。C#7新增了简单灵活的轻量级元组类型。分析了元组的几个典型应用场景,并给出了具体示例,包括多变量初始化、多变量赋值、多变量互换、封装函数返回的多变量、作为中间层的数据容器、用于LINQ select表达式获得语义信息,以及利用析构(deconstructing)实现对象到元组的自动转换等。实践表明,元组适合数据驱动领域开发,提高了生产效率,达到了动态语言效果。对C#7tuple存在的缺陷,如deconstructing的非对称性、赋值的非传递性和可变性(mutable)等提出了改进意见,为利用开源编译器Roslyn优化C#特性提供了设计思路。 As a modern developing language, C# was widely used in general-purpose software development. But due to C # syn- tax limitation in the past, data-intensive application domain were dominated by dynamic script languages such as MatLab, Py- thon, IDL(Interactive Data Language). C# 7 introduces tuple feature which is a simple and flexible data type. Typical applica- tion scenarios were analyzed and example details were presented, including initialization, assignment and swap of multiple varia- bles, packing return values of a method, providing semantic information in LINQ select and transform object to tuple members automatically. The study showed that C# tuple is suitable for data-driven software development in order to improve developer productivity and achieves effects of dynamic languages. At last, the C#7 defects in design, including asymmetry of decon- structing, non-transitivity of assignment and mutable were analyzed, and corresponding updating suggestion were presented, providing ideal for optimize C# 7 features in the future using open source compiler Roslyn.
作者 谢小魁
出处 《软件导刊》 2017年第9期7-9,共3页 Software Guide
基金 国家自然科学基金项目(51578243) 湖南省教育厅科学研究项目(16C0762)
关键词 元组 动态脚本 语言设计 编译器Roslyn Tuple Dynamic Script Language Design Compiler Roslyn
  • 相关文献

参考文献6

二级参考文献27

共引文献8

同被引文献4

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部