#Oberon-2
>>Do you find OO [Object Oriented) to be a good method for designing programs?
I don't make great use of it myself, but sometimes – in the middle of a data
file reorganization – I wish I had done.
Here's a rough sense of what OO gives you. You can (and should) take a piece
of the program's operation, and make it a fully independent module. Let me
explain that a bit further.
For example, in laying out a data file system, you could take both the data
structures and the programs that handle the data (find it, fetch it, change it,
add new records, delete unwanted records), and bundle it all together as a
"sealed" unit. Any application program that uses the data would then never go
directly to it; instead, it would request the bundle to perform the desired
action. The application program wouldn't know how the data was stored, or how
it was fetched, just how to call the operations it needs.
Here's the payoff: if it's ever desirable to change the setup of that data
file, the whole job will take place within that sealed bundle. You might
change the order or size of records, the sort/index method, whatever. The new
bundle would just get folded into the application programs, which wouldn't
notice that anything had changed, since they never touched that data directly.
The same could be done with various I/O modules too, for example.
–Jim