Future-proofing Collections: From Mutable to Persistent to Parallel

Java: JVM
Location: A105
Average rating: ***..
(3.89, 9 ratings)

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. Programing
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.

Photo of Martin Odersky

Martin Odersky


Martin Odersky is the inventor of the Scala language, a professor at EPFL in Lausanne, Switzerland, and Chairman and Chief Architect of Typesafe. His work concentrates on the fusion of functional and object-oriented programming. He believes the two paradigms are two sides of the same coin, to be unified as much as possible. To prove this, he has worked on a number of language designs, from Pizza to GJ to Functional Nets. He has also influenced the development of Java as a co-designer of Java generics and as the original author of the current javac reference compiler.

Comments on this page are now closed.


Picture of Eric van der Vlist
Eric van der Vlist
07/25/2011 9:23am PDT

I haven’t followed this session but the next one in the same room and wasn’t that happy to see it start 10 minutes late ;) ...