People keep implementing map, filter and other fundamental algorithms in different contexts - eagerly over collections, over lazy sequences, in parallel, over enumerables/iterables, over observables, over channels/streams etc. In addition to duplication of effort, this yields bloated APIs, and, when implemented in the classic way, often involves the creation of expensive intermediate objects/values that can be difficult to optimize away.
Most problematic is that this approach keeps us from composing core algorithms in a context-independent way which would facilitate reuse and engender greater flexibility.
This talk will describe transducers, a new library feature for Clojure (but of interest to other languages) that emphasizes composable, context-free, intermediate-free notions like 'mapping' and 'filtering' and their concrete reuse across all of the contexts above.
by Rich Hickey (@richhickey) - Cognitect
Rich Hickey, the author of Clojure and designer of Datomic, is a software developer with over 25 years of experience in various domains. Rich has worked on scheduling systems, broadcast automation, audio analysis and fingerprinting, database design, yield management, exit poll systems, and machine listening, in a variety of languages. Rich is CTO of Cognitect, Inc.
Watch video "Transducers" by Rich Hickey online, duration hours minute second in high quality that is uploaded to the channel Strange Loop Conference 19 September 2014. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 109,230 times and liked it 1.4 thousand visitors.