Hey!

Welcome to Blip, home of the best original web series! When you’re done watching this episode, checkout some of our top shows or learn more about us!

×

Clojure

David Nolen: "Predicate Dispatch"

Other Sharing Options

×
Embed
The embed code has been copied to your clipboard
Share
About this episode
When designing functions that can leverage more than the type of the first argument, the Clojurian reaches for multimethods. Yet after some experien...
When designing functions that can leverage more than the type of the first argument, the Clojurian reaches for multimethods. Yet after some experience, he/she might realize that multimethods have considerable limitations, particularly the closed nature of the dispatch function itself. How can we fulfill the promise of open extension? Predicate dispatch as described by Craig Chambers and Weimin Chen seems promising, but their implementation hardwires many important details. By leveraging the literature around high performance pattern matching compilation as found in Standard ML, OCaml, and Haskell and by driving the compilation with a logic engine, we can achieve a fully open predicate dispatch system with considerable performance gains over multimethods. Less
28:59 How To
Discover the best in original web series.© 2012 Blip Networks, Inc. All Rights Reserved.