Ross Esmond

Code, Prose, and Mathematics.

a picture of me
Written

State changes as Filters

When a photoshop user wants to try an old western affect on an image, they don’t have to irrepribly change the bitmap image to do so. Instead, they introduce a new “filter” element onto the layer stack, which applies the effect as long as it remains present, but may be removed at any time. This change-by-filter is distinct to most edits in most programs, as it may be reversed or updated at any time, regardless of how many subsequent changes have taken place.

State changes as filters may also be used in software, but are rare, as they combine an imperative interface to add and remove filters with a declarative framework to compute values with the filters.