From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,78609accbfa860fe X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!d32g2000yqe.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: usefulness of "data hiding" Date: Thu, 15 Jan 2009 17:33:49 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <72f07ba4-f06d-44bf-9759-0e6f0d0426d0@h20g2000yqn.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1232069629 9437 127.0.0.1 (16 Jan 2009 01:33:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Jan 2009 01:33:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d32g2000yqe.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:3367 Date: 2009-01-15T17:33:49-08:00 List-Id: On Jan 15, 4:51 pm, "Russ P." wrote: > Hello, > > I thought some of you here might be interested in the following debate > I have been having on comp.lang.python with regard to the usefulness > of "data hiding" or "enforced encapsulation." > > As many of you probably know, Python had no data hiding. It does not > allow you to declare anything "private," and everything is public by > default. (The convention is Python is to use a leading underscore to > identify a private _object or _function.) I suggested that a "private" > declaration could be useful if it could be implemented without > changing the language too drastically. Now, I can understand that > people just don't want to change the language that fundamentally, but > many Python folks over there insist that data hiding is just plain > useless in general. In fact, several people over there have argued > that Python is perfectly appropriate for even the largest safety- > critical systems. About the only thing I can say is in response to this (I'm assuming the following quote is not your own): > No. It is appropriate for dummy managers hiring dummy programmers. The > project's size and domain have nothing to do with it. I think that for this purpose, being capable of making a mistake makes one a dummy programmer. And that would include me, despite the fact that I've been programming for over 30 years. I do appreciate language features to help make it more difficult for me to make a mistake, because that cuts down on the amount of time I have to spend debugging my mistakes. Actually, I can't imagine why anyone wouldn't appreciate that, although I suspect it's an ego thing. -- Adam