2 ms·
My bigger programs tend to be about 60% procedural, 20% OO, 20% FP. The highest level "business logic" is procedural - global functions, global variables. Some
by cousin_it 18y ago
My bigger programs tend to be about 60% procedural, 20% OO, 20% FP. The highest level "business logic" is procedural - global functions, global variables. Some lower level supporting code is OO, for polymorphism (make certain kinds of objects interchangeable) and encapsulation (centralized bookkeeping and cleanup for clumps of variables). Other lower level bits are functional (systematically build up side-effect-free helper functions from smaller ones) or a mix. I never use inheritance, design patterns and all that gook.