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,FREEMAIL_FROM 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 Path: g2news2.google.com!postnews.google.com!z27g2000prd.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: usefulness of "data hiding" Date: Fri, 16 Jan 2009 15:23:10 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <72f07ba4-f06d-44bf-9759-0e6f0d0426d0@h20g2000yqn.googlegroups.com> NNTP-Posting-Host: 62.49.19.209 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1232148190 24328 127.0.0.1 (16 Jan 2009 23:23:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 16 Jan 2009 23:23:10 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z27g2000prd.googlegroups.com; posting-host=62.49.19.209; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:4373 Date: 2009-01-16T15:23:10-08:00 List-Id: On Jan 16, 8:57=A0am, "Dmitry A. Kazakov" wrote: > On Thu, 15 Jan 2009 16:51:38 -0800 (PST), Russ P. wrote: > > As many of you probably know, Python had no data hiding. > > Python is a dynamically typed language. When dynamic typing is considered > conceptually that inevitably leads you to weak and then to no typing. In = an > effectively untyped framework (this includes massive type inference as > well), you necessarily have to drop encapsulation. There is nothing to > hide, and nothing can be hidden. I have seen it said (maybe about Python) that that sort of language has untyped variables but strongly typed values in that the value knows what it is and what can be done to (by) it. Of course you can't tell whether o.lower() will return the lower-case version of the string o or the tune o transposed down by a semitone or a runtime error, which does make it kind of hard to reason about the program; but I don't see where that equates to dropping encapsulation.