Functional design organizes code around functions and offers simplicity, clarity, and provability as alternatives to object-oriented design. It also brings a learning curve. section 3.4
Use the philosophy as a practical design option rather than an absolute rule:
- Choose between functional and object-oriented designs according to what works for the team; the underlying patterns can often be translated between styles. section 3.4
- Expect additional caller responsibility when solving a dependency problem by adding a function parameter; the result can feel overly chatty. section 3.4
- Use functional techniques for injecting stubs and mocks when they make dependencies easier to control in tests. section 3.4 section 4.6
Function-level dependency injection
Adding a parameter can remove a function's dependency, but every caller must then know how to handle the dependency, such as dates. The technique solves one problem while increasing communication between callers and functions. section 3.4


















