3 ms·
The problem is that real-world domains—or even just relatively complex software domains—do not decompose perfectly into 100% self-contained units. It's not even
by tikhonj 3y ago
The problem is that real-world domains—or even just relatively complex software domains—do not decompose perfectly into 100% self-contained units. It's not even a limitation of any given programming language (although those limitations matter too!); we can't even have a purely conceptual ontology where everything neatly fits into exactly one slot in a neat hierarchy. That's just not how, well, anything works.
It's definitely worth trying to have your code neatly organized in a way that maps to some clean conceptual model, but doing that well is going to require using every tool at your disposal—which includes ways of grouping code that don't need the sort of crisp definition and conceptual coherence of an in-language abstraction.
Sections and sub-sections seem like a reasonable way to do that with our modern, painfully limited tools. If we weren't limited by needing everything to live in plain text, I'd also reach for something like a system of tags.