Feb 13, 2008: Burak Emir on “Extraction and Pure Scala”

The next meeting of BayFP is Wednesday, February 13th. We’re still ironing out the location details, but I wanted to send out the topic and dateThe meeting will be hosted at Twitter, 164 South Park St., San Francisco, CA. Burak Emir will be our speaker.

“Extraction and Pure Scala — from object-oriented pattern matching back to functional programming”

Extractions are a way to harness the conciseness of pattern matching known from functional programming with the versatility of object-oriented progamming. They are user-definable patterns which can match and deconstruct any data into subcomponents, without imposing constraints on the way data is defined. The flexibility comes at a price though, since user-defined code cannot be optimized as well as hardwired pattern matching logic.

In this talk, I will describe how extractions are used in Scala programs and how they relate to case classes, followed by just enough theory to see what kind of optimizations is done. These optimizations
have been proven correct (which does not happen too often in compiler construction) using a purely functional calculus that models Scala, as in fact extraction is a purely functional construct. At the end of this talk, I will make the connection to generic pattern matching and why I think it would be a good idea to start a purely functional dialect of Scala (Pure Scala).

Burak added unicode support to Scala, wrote Scala’s XML libraries, added XML expressions to the Scala compiler and wrote and maintained the Scala bugtracking system (before it was replaced with trac). He wrote his thesis on “Object-Oriented Pattern Matching” at the Programming Methods Lab at EPFL, under supervision of Martin Odersky, and now works for Google.