Lawrence D'Oliveiro a écrit :
In message <[EMAIL PROTECTED]>, James
Mills wrote:

On Fri, Sep 26, 2008 at 8:20 AM, Lawrence D'Oliveiro
<[EMAIL PROTECTED]> wrote:

Object orientation IS procedural.
Correction: OOP is Imperative.

No, "procedural".

Nope, "imperative" !-)

The functional unit is called an "expression", the encapsulation of which is
called a "function". Hence "functional".

Similarly, the procedural unit is commonly called a "statement", the
encapsulation of which is a "procedure", not an "imperator".
Hence "procedural".

"imperative" means that the computation is done through statements that modify the program's state.

"procedural" means that these statements are organized in "procedures", that group a serie of statements.

OO is based on objects (that carry and manage internal state) and messages. A message can happen to trigger a serie of statements that modifies a program state, so you could say (and this wouldn't be totally false) that an OO method can be seen as a procedure (or at least some methods...), but the whole program's organization is still not the same as one seen in procedural programming. IOW, it's more a matter of how you design / organize your (otherwise imperative) program than anything else.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to