On Fri, 20 Oct 2017 18:30:25 +0000, Allan Staller
(allan.stal...@hcl.com) wrote about "Re: too true: Vulture Central on
"the next big thing"." (in
<sg2pr04mb0959a12157a5c714e7bf8e47e3...@sg2pr04mb0959.apcprd04.prod.outlook.com>):

> My understanding (albeit limited) is that O-O is modular programming with the
> concept of "inheritance" added.

There is considerably more than that.

As a moron's guide to Object Oriented Programming (OOP) here is a
simple, layered approach:

The first part is encapsulation. This consists of laying out a data
structure, called a class, that will be instantiated whenever it is
needed. This data structure then has methods (an up-market term for
subroutines and functions) associated with it, but most of these methods
can only be invoked using an instance of the class. Thus, the methods
are encapsulated by the class.

The second part is polymorphism. This allows a single method name to be
used with different semantics, based on the class through which it is
invoked and its argument signature. This is identical to the PL/I
GENERIC declaration, except the rules for monomorphic selection on a
polymorphic name have to be coded explicitly in PL/I but are inferred by
the compiler in more modern languages.

The third part is inheritance. This permits new classes to be declared
based on existing classes, with the new classes inheriting the data
items in the structure and the methods encapsulated in the earlier
classes. These are called subclasses. The methods can be overridden in
the subclasses if necessary. Additional data items can be added to the
structure too.

Actually laying out a class requires a great deal of analysis. This is
why people who can b.s. their way into senior analyst positions rattle
on about Object Oriented Design (OOD) as if it were some kind of magic.
There is no moron's guide to OOD, as it can be exceedingly complex.

> I am not sure if SP caused modular or vice-versa.

Modular programming came in with FORTRAN II in the late 1950s, when it
started allowing FUNCTION and SUBROUTINE definitions. This is long
before Structured Programming.
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
david.w.n...@googlemail.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to