surface • Solve small parts of bigger problems — regardless of whether your codebase is 50 or 500,000 LOC, focus only in the current function body • Easily assemble without baggage because functions are pure • Refactoring: establish new ideals then solve errors
fi x • avoid shadowing variables • avoid cyclic dependency • avoid inheritance • avoid mutation • prefer explicit dependency • prefer stateless functions • pure functions are testable • … “I’m more interested in functional techniques than functional languages
Render DOM Call Javascript Http response Input change Mouse move Pure Function Pure Function Pure Function Pure Function Pure Function Pure Function Pure Function Pure Function Pure Function
a UI Antipattern http://blog.jenkster.com/2016/06/how- elm-slays-a-ui-antipattern.html • Making Impossible States Impossible https://youtu.be/IcgmSRJHu_8 • Business logic in Elm that runs anywhere https://morphir. fi nos.org/ why_functional_programming • Exploring “Pure Core Imperative Shell” in Ruby https:// www.destroyallsoftware.com/talks/boundaries
unambiguously see https://youtu.be/Up7LcbGZFuo • Pure and Functional — can actually be done in any language, but you get to keep your footguns. I prefer no footguns. see https://youtu.be/US8QG9I1XW0