3 ms·
> Too many small methods, classes or modules > Method, class and module are interchangeable in this context Class, method, functions are NOT the only way to ma
by creer 2y ago
> Too many small methods, classes or modules
> Method, class and module are interchangeable in this context
Class, method, functions are NOT the only way to manage cognitive load. Other ways work well for thinking developers:
Formatting - such as a longer lines and lining up things to highlight identical and different bits.
Commenting - What a concept?! using comments to make things more clear.
Syntactic sugar, moderate use of DSL features, macros... - Is this sometimes the right way?
But yeah, if your tool or style guide or programming language even, imposes doing everything through the object system or functions, then someone clearly knew better. And reduced your cognitive load by taking away your choices /s.