[Tutor] Subclassing vs. stand alone functions
Alan Gauld
alan.gauld at btinternet.com
Sat Jun 16 09:27:55 CEST 2007
<chrispython at mac.com> wrote
>>Just so you know, my day gig is maintaining a 30 year old COBOL app
>>and
>>writing custom RPGLE - http://en.wikipedia.org/wiki/RPGLE - on an
>>IBM i5.
>>So that's where I am coming from.
Thats probably one of the hardest places to learn OOP from.
COBOL, more than any other language I've used forces
programmers to separate data and function explicitly. It then
compounds matters by encouraging the use of global
variables (within modules at least).
Of course COBOL is peerless in tackling exactly those problems
where OOP is weakest - large volume data translation. But its a
big jump from thinking in COBOL to thinking in OOP. I had to
make the transition in the opposite direction and it was "challenging"
Of course there is COBOL WITH OBJECTS now but I've no idea
how that works. And with rigid discipline you can build with very
small modules comprising precisely one data structure and the
functions that operate on that but its not conventional COBOL
practice.
So I sympathise, but urge you to hang in there the penny
will start to drop, especially if you try to create some projects
that suit OOP - like building a few GUIs or simulations.
Regards,
Alan G.
(2 years with MicroFocus COBOL on OS/360 for Y2K ;-)
More information about the Tutor
mailing list