Design patterns·Functional ideas that went mainstream
each step either continues the happy path or diverts to the failure track, and no step checks whether the last one worked.
Railway-oriented programming
Also calledrailway oriented programming, ROP, error track
Composing a sequence of operations that each return a result type, so a failure at any step short-circuits the rest without an explicit check between them. The two-rail metaphor is Scott Wlaschin's and it is what makes result types practical instead of tedious. The mechanism underneath is a monadic bind, which is worth knowing but not worth leading with when explaining it to a team.