comp.lang.ada
 help / color / mirror / Atom feed
From: sjw <simon.j.wright@mac.com>
Subject: Re: usefulness of "data hiding"
Date: Fri, 16 Jan 2009 15:23:10 -0800 (PST)
Date: 2009-01-16T15:23:10-08:00	[thread overview]
Message-ID: <d5816af9-0d30-49d8-b479-d9d928359d08@z27g2000prd.googlegroups.com> (raw)
In-Reply-To: o029wq1r5hym.1r8ep5ye1ieoi$.dlg@40tude.net

On Jan 16, 8:57 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
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.



  reply	other threads:[~2009-01-16 23:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16  0:51 usefulness of "data hiding" Russ P.
2009-01-16  1:08 ` Russ P.
2009-01-16  1:33 ` Adam Beneschan
2009-01-17 19:05   ` Marc A. Criley
2009-01-19 16:15     ` Adam Beneschan
2009-01-16  8:57 ` Dmitry A. Kazakov
2009-01-16 23:23   ` sjw [this message]
2009-01-17  8:53     ` Dmitry A. Kazakov
2009-01-18 13:07   ` Graham Stark
2009-01-18 14:17     ` Dmitry A. Kazakov
2009-01-16 17:21 ` Nicholas Collin Paul Gloucester
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox