Deutsch   English   Français   Italiano  
<OOP-20241218203833@ram.dialup.fu-berlin.de>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.c++
Subject: Re: What is OOP?
Date: 18 Dec 2024 19:42:04 GMT
Organization: Stefan Ram
Lines: 58
Expires: 1 Jan 2026 11:59:58 GMT
Message-ID: <OOP-20241218203833@ram.dialup.fu-berlin.de>
References: <d8a5a0d563f0b9b78b34711d12d4975a7941f53a.camel@gmail.com> <gog0ljdjdhdekscrcbpprte8788aerq05h@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de xTFFUzCINIRZM4r8xJERTABM5jnadyWOu5IKmffrrP3vqe
Cancel-Lock: sha1:6SSNJhAk8wUbN6mKBI1ZCIAlDek= sha256:Fa49PZZhDK0ygJp7liyyD73CE3embOYE+Jsz7oyhQFw=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
	Distribution through any means other than regular usenet
	channels is forbidden. It is forbidden to publish this
	article in the Web, to change URIs of this article into links,
        and to transfer the body without this notice, but quotations
        of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
	services to mirror the article in the web. But the article may
	be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Bytes: 3815

Rosario19 <Ros@invalid.invalid> wrote or quoted:
>what is oo programming?

  Alan Kay coined the term, and, in 2003, I asked him:

What does "object-oriented [programming]" mean to you?

  . He answered in an e-mail:

|OOP to me means only messaging, local retention and protection and 
|hiding of state-process, and extreme late-binding of all things.

  . My personal interpretation (taking the above source and my
  own observations into account):

An object is an imaginary building block that contains states
and procedures and can only be accessed from the outside by
sending messages. The object decides how it reacts (within the
scope of its specification) to a specific message. (runtime
model)

In object-oriented programming, programs describe under which
conditions which messages are sent to object expressions at
runtime: For this purpose, there is a dispatch specification
that defines the recipient object expression and the message
to be sent. This dispatch definition can also be regarded as
an expression whose value is then determined by the recipient
object (as a type of response). (source code model) 

It must be possible to determine which object receives a
particular message (late binding) as late as possible (i.e. at
runtime during the evaluation of the dispatch determination):
For this purpose, the recipient object can be specified again
in the dispatch determination itself by means of an expression
that is only evaluated at runtime as late as possible (runtime
polymorphism).

  Yes, I really think it is better to say that we send messages
  to expressions because which object the expression represents
  is only determined shortly beforehand and can be different
  each time the same code is run several times.

  But there's something else of equal importance! It's the
  insight by Uncle Bob (Robert C. Martin) about when procedural
  code is better and when object-oriented code is better.

|Procedural code (code using data structures) makes it easy to
|add new functions without changing the existing data
|structures. OO code, on the other hand, makes it easy to add
|new classes without changing existing functions.
Robert C. Martin

|Procedural code makes it hard to add new data structures
|because all the functions must change. OO code makes it hard
|to add new functions because all the classes must change.
Robert C. Martin