Locality of Behavior

Note: This page is a stub / incomplete.

"Locality of Behavior" (LoB) is a term coined by Carson Gross (author of htmx): https://htmx.org/essays/locality-of-behaviour/

Another way to describe it is "no spooky action at a distance" - try to be careful with introduction abstractions and the way you use them.

While it clashes with DRY (Don't Repeat Yourself), it doesn't mean you need to make everything local by copy&pasting the code everywhere.

A good example is a well-defined pure function - it should be very obvious just by looking at the calling site (by the function name and arguments) what the function is supposed to do, without doing "spooky" things at a distance.