Thoughtstream | Seminars

Transparadigm Programming
Transparadigm Programming

Each of the standard programming paradigms (imperative, functional, OO, declarative, concurrent) provides a collection of problem-solving tools that is optimized for particular kinds of tasks...and for particular ways of thinking about problem-solving.

But no single paradigm provides tools that are optimal for all kinds of tasks...or for all ways of thinking about problems.

Normally this means you have to adapt your software solutions to the limitations of your programming language’s unique world-view: if all you have is a hammer, every problem looks like a nail; if all you have is C, every problem looks like bit manipulation; if all you have is Haskell, every problem looks like the multiple dispatch of implicitly typed functions; if all you have is Java, every problem looks like a vast agglutinated morass of incomprehensible class libraries.

Dr Conway will discuss a long-term Open Source project that attempts to create a single unified toolbox, integrating the major features of all five major paradigms to create a programming system that lets you select and combine the optimal linguistic tools for each job, no matter which universe they come from.

This new approach even allows you to compose those distinct tools together in natural ways within a single code block or subroutine. For example, you could implement a class method using functional programming. Or combine distributed and SIMD tests to control a single procedural while loop that’s embedded in an otherwise pure function. Or inherit a set of imperative actions that are nested inside the OO rules of a declarative grammar.

So a single implementation could easily combine low-level C-like bit-manipulation (where that makes sense), with high-level Haskell-ish multiple dispatch (when it’s convenient), as well as large-scale Java-y class hierarchies (if they also happen to be the right tool).

This talk will explore the ideas of transparadigm programming using a series of simple (but real-world) examples, such as: LZW data compression, SHA-256 digests, AWS Glacier hash-trees, concurrent data validation, and parsing LaTeX documents.