首页> 外文会议>Compiler construction >Future-Proofing Collections: From Mutable to Persistent to Parallel
【24h】

Future-Proofing Collections: From Mutable to Persistent to Parallel

机译:面向未来的集合:从可变到持久到并行

获取原文
获取原文并翻译 | 示例

摘要

Multicore processors are on every desk now. How are we going to make use of the extra power they provide? Some think that actors, or transactional memory, or some other new concurrency construct will save the day by making concurrent programming easier and safer. Even though these are welcome, I am skeptical about their ultimate success. Concurrency is fundamentally hard and no dressing up will be able to hide that fact completely. A safer and for the programmer much simpler alternative is to treat parallel execution as essentially an optimization. A promising application area are collections. Programming by transforming and aggregating collections is simple, powerful, and can be optimized by executing bulk operations in parallel. To be able to do this in practice, any side effects of parallel operations need to be carefully controlled. This means that immutable, persistent collections are more suitable than mutable ones. In this talk I will describe the new Scala collections framework, and show how it allows a seamless migration from traditional mutable collections to persistent collections, and from there to parallel collections. I show how the same vocabulary of methods can be used for either type of collection, and how one can have parallel as well as sequential views on the same underlying collection. The design of this framework is guided by the "uniform return type principle": every collection transformer should return the same kind of collection it applies to. Simple as this sounds, it is surprisingly hard to achieve in a statically typed language with a rich type hierarchy (in fact, I know of no other collections framework that achieved it). In the talk I will explain the type-systematic constructions required by the principle. I will also present some thoughts on how we might develop type-explanation capabilities of compilers to effectively support these techniques in a user-friendly way.
机译:现在每个桌面上都有多核处理器。我们将如何利用它们提供的额外功能?有些人认为参与者,事务存储或其他一些新的并发构造将使并发编程更容易,更安全,从而节省了一天的时间。尽管欢迎这些,但我对它们的最终成功表示怀疑。从根本上说,并发很难,并且不进行任何修饰就可以完全隐藏这一事实。对于程序员来说,更安全,更简单的选择是将并行执行本质上视为一种优化。收藏是一个很有希望的应用领域。通过转换和聚合集合进行编程非常简单,功能强大,并且可以通过并行执行批量操作进行优化。为了在实践中能够做到这一点,需要仔细控制并行操作的任何副作用。这意味着不变的,持久的集合比可变的集合更适合。在本演讲中,我将描述新的Scala集合框架,并展示它如何允许从传统可变集合到持久性集合的无缝迁移,再从那里迁移到并行集合。我展示了如何对两种类型的集合使用相同的方法词汇,以及如何在同一基础集合上具有并行视图和顺序视图。该框架的设计遵循“统一返回类型原则”:每个集合转换器都应返回与其适用的相同类型的集合。听起来很简单,但是很难使用具有丰富类型层次结构的静态类型语言来实现(实际上,我不知道有其他集合框架可以实现它)。在演讲中,我将解释该原理要求的类型系统构造。我还将就如何开发编译器的类型解释功能提出一些想法,以便以用户友好的方式有效地支持这些技术。

著录项

  • 来源
    《Compiler construction》|2011年|p.1|共1页
  • 会议地点 Saarbrucken(DE);Saarbrucken(DE);Saarbrucken(DE);Saarbrucken(DE)
  • 作者

    Martin Odersky;

  • 作者单位

    Programming Methods Group (LAMP) School of Computer and Communication Sciences (IC) Ecole Polytechnique Federate de Lausanne (EPFL) Lausanne, Switzerland;

  • 会议组织
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类 计算机软件;
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号