[Tutor] Basic Question

Alan Gauld learn2program at gmail.com
Fri Sep 10 19:24:24 EDT 2021


On 10/09/2021 23:05, dn via Tutor wrote:
> However, listening to the OP's needs did make me wonder (again) if we
> become so enamored/enamoured with the actual objects and their
> characteristics and associated 'rules', that we spend very little
> (teaching) time discussing the less-obvious, but entirely essential,
> need to pass "messages" between objects - see earlier excellent
> description of using arguments/parameters.

It's the difference between OOP as a paradigm and OOPL as a set of language
features that support the paradigm.

Most courses teach OOPLs but forget all about teaching the paradigm.

It is perfectly possible to program using OOP in a non OOPL, indeed the
vast majority of early OOP programs were written in Pascal, Lisp and C.
Some even in COBOL. Of course, OO features were added to all those
languages to deliver OOPL versions of them (ie. C++, CLOS, Object Pascal
and COBOL WITH OBJECTS) .

But the OOP paradigm is all about message passing between objects.
And an object is an encapsulation of data and the functions that operate
upon it.

And an OOP program is one that comprises a set of objects that communicate
via messages. With each object having its own method of responding to
its received
messages (polymorphism). That's why we call bound functions methods.

> Advanced topics find that word (messages) being re-used?over-loaded with
> the likes of MQ (message queuing) and specific techniques related to
> multi-processing and API calls.
>
> So, the base concept would seem important when writing one's first code,
> and will expand both conceptually and practically, with one's horizons.

The message passing paradigm is the cornerstone of OOP and is
almost totally ignored in modern OOP teaching  As a result we have
abominations like Java which is a class based language rather than
object based and actively encourages people to write non OOP
programs using objects!

People have become fixated on language features and forgotten
about the very concepts that make OOP effective in large scale
programming. And also the concepts that tie it back to core
computing and control theory with communicating sequential
machines.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list