74 points · by mavelikara · 3y ago · 15 comments
On the criteria to be used in decomposing systems into modules (1972) [pdf] - https://news.ycombinator.com/item?id=30138468 - Jan 2022 (27 comments)
On the criteria to be used in decomposing systems into modules (1971) - https://news.ycombinator.com/item?id=8849468 - Jan 2015 (5 comments)
Folks interested in studying more of Parnas' foundational papers should checkout the book Software Fundamentals: Collected Papers by David L.Parnas. A good antidote to "cargo culting".
His thoughts are in "Notes on the Synthesis of Form" (1964) and I believe his conclusions are similar to the authors of this article: split the design problem into "clusters" of decisions, so as to minimize the dependencies between "clusters".
The mentality of most developers there was: How can I make the change described in the ticket by touching as little existing code as possible?
TU with opaque pointers can be used for such purposes, and they are, but still fail short of Modula-2, Mesa, CLU and UCSD Pascal, to cite contemporary examples.
How come? C makes it trivial to create self-contained modules.
It lacks almost everything that a programming language with modules offers on its type system, and compiler toolchain.
Proper public/private types, module initialization/shutdown, linking with type checking, namespaces.
One can fake modules with void pointers, static types on translation units, prefixes that hopefully no one else is using, and that is about it.