Skip to content

PySR 0002: FP/OOP

You shouldn't make a black-or-white choice between Functional Programming and Object-Oriented Programming. A good codebase mixes both, as both have their advantages and disadvantages.

Use OOP when you need to group data into units, method chaining, or multiple persistant local variables.

Use FP when you need one clear, pure function to perform a singular task.