Perché "OOP" e non semplicemente "Programmazione oggetto"?

6

Perché diciamo "programmazione orientata agli oggetti" e non semplicemente "programmazione degli oggetti"? Perché parliamo di orientamento in questo caso, e non "programmazione orientata al funzionamento" e così?

    
posta Niklas Rosencrantz 06.11.2013 - 15:32
fonte

2 risposte

8

Perché Alan Kay ha detto così.

Più in particolare, c'erano dei linguaggi prima che Smalltalk avesse oggetti o strutture simili agli oggetti, ma Smalltalk era la prima lingua progettata specificamente per utilizzare gli oggetti come metodo di calcolo primario.

This is probably a good place to comment on the difference between what we thought of as OOP-style and the superficial encapsulation called “abstact data types” that was just starting to be investigated in academic circles. Our early “LISP-pair” definition is an example of an abstract data type because it preserves the “field access” and “field rebinding” that is the hallmark of a data structure. Considerable work in the 60s was concerned with generalizing such strcutures [DSP *]. The “official” computer science world started to regard Simula as a possible vehicle for defining abstract data types (even by one of its inventors [Dahl 1970]), and it formed much of the later backbone of ADA. This led to the ubiquitous stack data-type example in hundreds of papers. To put it mildly, we were quite amazed at this, since to us, what Simula had whispered was something much stringer than simply reimplementing a weak and ad hoc idea. What I got from Simula was that you could now replace bindings and assignment with goals. The last thing you wanted any programmer to do is mess with internal state even if presented figuratively. Instead, the objects should be presented as site of higher level behaviors more appropriate for use as dynamic components.

La parte più significativa di questo passaggio è l'idea di un "obiettivo". L'orientamento implica quindi un obiettivo, una programmazione orientata agli oggetti piuttosto che una programmazione oggetto. Menziona anche la programmazione orientata ai problemi e orientata all'espressione. Ho il sospetto che sia più di quanto OOP non abbia buzzword e che non sia orientato alle funzioni.

    
risposta data 06.11.2013 - 15:57
fonte
3

Il funzionale è un aggettivo, non diciamo Function Programming . Ma non esiste una bella parola corrispondente per l'oggetto **, quindi usiamo Object Oriented per formare un aggettivo.

Inoltre, la programmazione orientata alla funzione è mal formata, si vorrebbe la Programmazione orientata alle funzioni, che funziona, ma perché preoccuparsi di tale verbosità quando abbiamo già "funzionale".

** Obiezione e Obiettivo non funzionano davvero.

    
risposta data 06.11.2013 - 15:58
fonte

Leggi altre domande sui tag