Does Python really follow its philosophy of "Readability counts"?
James Mills
prologic at shortcircuit.net.au
Tue Jan 13 22:32:54 EST 2009
On Wed, Jan 14, 2009 at 1:18 PM, Russ P. <Russ.Paielli at gmail.com> wrote:
> Yes, but the fact that you can approximate OO programming in a
> particular language does not make that language object oriented. You
> can approximate OO programming in C, but that does not mean that C is
> an OO language.
Wrong. Not having strict and enforced access control 9_NOT_ encapsulation)
(Please stop confusing the two) is not a strict requirements of the OO model.
Remember that it is a model and not a strict set of requirements that
programming
languages must implement.
In fact, Python borrows features from the Functional Paradigm. Does this
make it a Functional Language ? No. Why ? Because one of the clear
requirements of the Functional Paradigm is that functions cannot have
side affects.
> So I can claim that Python is not strictly object oriented until it
> gets encapsulation (in the sense of data hiding). That is simply a
> fact, and no amount of pleading or obfuscation will change it.
In fact this is true, C can be seen as an programming language
that has features of the OO model.
I think one of the things you guys are missing out
here is that there are really only two Paradigms
or Machines. Functional and Imperative. And guess
what ? As it turns out we can implement functional
machines that run on top of imperative ones!
> Should Python get true encapsulation? I don't know. Maybe
> encapsulation cannot be added without excessive overhead or without
> compromising other more important aspects and features of the
> language. But I do know that not having encapsulation is a limitation
> to the use of Python for good software engineering. I may be in the
> minority in the Python "community" on this one, but I am apparently in
> the majority in the OO programming "community."
Again, stop confusing terminology.
Should Python get strict and enforce access control
of object members ? No. Why ? I can think of several
reasons.
Give me one use-case where you strictly require
that members of an object be private and their
access enforced as such ?
cheers
James
More information about the Python-list
mailing list