Exploring the philosophy of objects
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Fri Jun 24 16:37:41 UTC 2022
On Friday, 24 June 2022 at 15:14:44 UTC, Ola Fosheim Grøstad
wrote:
> The Simula class concept is to a large extent meant to support
> changing the model later. So it is sensible for simulation
> where you experiment (programming cost being higher than
> hardware costs). This is basically where inheritance comes in.
> You have a working model, then someobody tells you: we actually
> need to model not only Doctors, but also Nurses,
> AmbulanceDrivers etc. How quickly can you accomodate that wish?
> This is also a strength of relation-based databases, just add
> more tables.
On a personal note: I also use have a default preference for OO
when that makes it possible to avoid documentation because the
implementation has a 1-1 correspondence with the model. Then you
don't have to deal with out-of-date documentation and the boring
task of writing documentation.
This is also desirable when you evolve software rather than plan
it (experimental prototyping or simulation). If you expect a lot
of successive changes then documentation becomes a real burden.
More information about the Digitalmars-d
mailing list