Alternatives to OOP in D
Peter C
peterc at gmail.com
Tue Nov 11 07:12:38 UTC 2025
On Monday, 10 November 2025 at 08:53:29 UTC, Brother Bill wrote:
>
> ..
> There should be one rule which is: Whatever language or
> pattern that you are using, the program should be "correct",
> that is, obey the "business rules".
Clearly correct code is necessary, but it's not sufficient.
Code also needs to 'sustaining' correctness - through
maintenance, scaling, and change.
Adair Dingle, in his award winning book from 2014, titled
'Software Essentials Design and Construction', correctly asserts
that it is 'software maintenance' that dominates the software
life cycle.
So patterns and paradigms are not just an arbitrary choice. They
are the tools that provide for shared reasoning. They should be
chosen precisely because they provide the guardrails that help to
make 'correctness' easier to achieve and sustain over the
life-cycle of the code.
'Good code' (regardless of patterns and paradigms) structures
logic in a way that makes correctness easier to reason about ->
collaboratively.
That is, if the person writing the code is the only one that can
reason about it, then is certainly *not* good code.
"The true measure of code quality, is that it's correctness is
easy to reason about collaboratively." - me, Nov 2025.
More information about the Digitalmars-d-learn
mailing list