Treat functions as mathematical ones: pure functions. ▪ No hidden IOs; avoid state and side effects. ▪ No pure functional programming language is needed. 4
bugs ▪ Output only depends on arguments → easier tests ▪ Inputs and outputs are explicit → easier maintenance ▪ More reuse and composition → faster coding 9
IOs. ▪ Fewer side effects → fewer bugs ▪ Output only depends on arguments → easier tests ▪ Inputs and outputs are explicit → easier maintenance ▪ More reuse and composition → faster coding ▪ There are no silver bullets. Use them when it makes sense. 19
nested. If the implementation is hard to explain, it’s a bad idea. If the implementation is easy to explain, it may be a good idea. The Zen of Python. 20