Python Productivity over C++ (Encapsulation)

Frank V. Castellucci frankc at colconsulting.com
Sat Jun 17 17:46:05 EDT 2000


Hung Jung Lu wrote:
> 
> --- In python-list at egroups.com, Ken Seehof <kens at s...> wrote:
> >"Frank V. Castellucci" wrote:
> > > Courageous wrote:
> > > While the last line seems rather toungue in cheek, there are other
> > > things that C++ brings to the table such as encapsulation, access
> > > control and type strictness.
> >Encapsulation, access control and type strictness are often erroneously
> >referred to as if they were features.  They aren't.  They are aspects of a
> >design philosophy.  To make a system less error prone, constrain the
> >programmer
> >in order to prevent the programmer from writing bugs.  ...
> >You have to ask, "what is the actual value of these features?"  The answer
> >is
> >that they prevent certain kinds of bugs from appearing.
> 
> Type strictness is fine. It has all to do with performance: small, fast,
> efficient machine code. Encapsulation is a totally different story.
> 
> One of the biggest lies in modern computer language theory is that
> encapsulation is there for a good technical reason.
> 
> And generations of students were lied to, and sadly, 99% believed in what
> the textbooks said. Some of them became programmers, and only after 15 or 20
> years in the field would they wake up one day to realize that, heck, they've
> been lied to all along. :) (Doesn't all this remind you of Nazis and
> Communism? Collective blindness is far more common that you think, ha!)
> [snip]

Crap. Encapsulation allows me to change the storage hidden by a class
from a Stack to a MultiMap without any effect througout the rest of the
system. It does not require anyone to recompile, doesn't require any
more maintenance.

I also use data hidding in Python.

What a stupid response you made. You must be guilty of exposing the data
members in the interface. This is sickening.


-- 
Frank V. Castellucci



More information about the Python-list mailing list