Extractions are a way to harness the conciseness of pattern matching known from functional programming with the versatility of object-oriented proga...
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). Slides are available here: http://docs.google.com/Presentation?docid=dq5x3kc_13hpv7cqgj About Bay Area Functional Programmers: BayFP meets monthly with talks on functional programming. Slides and videos from previous talks are available at http://bayfp.org/blog/. The group mailing list is http://groups.google.com/group/bayfp/.
Less
We keep track of your subscriptions through your Facebook account. No additional registration required.
Nothing will be posted to Facebook without your explicit permission.