How to think about Python's few controversies (was: Migrating to perl?)

Cameron Laird claird at starbase.neosoft.com
Fri Jan 5 07:34:51 EST 2001


In article <slrn95atra.vm6.quinn at zloty.ugcs.caltech.edu>,
Quinn Dunkan <quinn at zloty.ugcs.caltech.edu> wrote:
>On Fri, 5 Jan 2001 00:47:32 -0500, Joel Ricker <joejava at dragonat.net> wrote:
			.
			.
			.
>Well, I hate to disappoint, but python doesn't enforce encapsulation.  Just
>like it doesn't enforce types---you'll get a runtime error down the line.  I
			.
			.
			.
>provide automatic accessors.  I've discovered, though, that I've never had a
>problem with python's direct access.  Just use your good judgement---you may
			.
			.
			.
I want to underline a couple aspects of this situation:
1.  Although Python doesn't enforce (this kind of)
    encapsulation, there's good style that makes
    it a matter of convention (and, for those in a
    belligerent mood, argument that that's all C++
    does, anyway);
2.  Encapsulation's important.  However, whether
    it should be a compile-time guarantee or a more
    dynamic matter is also an arguable point.  As
    Mr. Dunkan notes, Python's choice never seems
    to be a problem in practice.

    More generally, Python is quite clean.  It has
    a few consistent syntactic controversies--signi-
    ficant white space, (un)encapsulation, a few
    perceived deficiencies in assignment and
    looping--but the remarkable thing is that each
    of these is, from all the evidence, more of an
    issue for spectators than participants.  Python's
    made the right choices.  It works well.  Even if,
    say, significant white space discomforts you on
    some abstract level, my prediction is that you'll
    quickly come to like it once you try it.
-- 

Cameron Laird <claird at NeoSoft.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list